forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·30 lines (28 loc) · 774 Bytes
/
bootstrap.sh
File metadata and controls
executable file
·30 lines (28 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function doIt() {
rsync --exclude ".git/" \
--exclude ".DS_Store" \
--exclude "bootstrap.sh" \
--exclude "bin/" \
--exclude "README.md" \
--exclude "brew.sh" \
--exclude "LICENSE-MIT.txt" \
--exclude "iterm-profile.json" \
--exclude ".editorconfig" \
--exclude ".dockermachine-config" \
--exclude ".editorconfig" \
-avh --no-perms . ~;
# If .dockermachine-config doesn't exist, copy it
if [ ! -f ~/.dockermachine-config ]; then
cp .dockermachine-config ~/.dockermachine-config
fi
}
if [ "$1" == "--force" -o "$1" == "-f" ]; then
doIt;
else
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
doIt;
fi;
fi;
unset doIt;