-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync.sh
More file actions
46 lines (35 loc) · 838 Bytes
/
sync.sh
File metadata and controls
46 lines (35 loc) · 838 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
# Originally from https://github.com/andrew8088/dotfiles/blob/main/install/bootstrap.sh
# bootstrap installs things.
cd "$(dirname "$0")/.."
ICLOUD_PATH="$HOME/Library/Mobile Documents/com~apple~CloudDocs"
set -e
echo ''
info () {
printf "\r [ \033[00;34m..\033[0m ] %s\n" "$1"
}
user () {
printf "\r [ \033[0;33m??\033[0m ] %s\n" "$1"
}
success () {
printf "\r\033[2K [ \033[00;32mOK\033[0m ] %s" "$1"
}
fail () {
printf "\r\033[2K [\033[0;31mFAIL\033[0m] %s\n" "$1"
echo ''
exit
}
copy_icloud_data() {
## fonts
if [ -d "$ICLOUD_PATH/Code/dotfiles/sync/fonts" ]
then
cp -Rf "$ICLOUD_PATH/Code/dotfiles/sync/fonts/"* "$HOME/Library/Fonts/"
success "Copied fonts"
else
fail "No fonts found in iCloud"
fi
}
copy_icloud_data
echo ''
echo ''
success 'All installed!'