-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.zsh
More file actions
executable file
·28 lines (22 loc) · 824 Bytes
/
install.zsh
File metadata and controls
executable file
·28 lines (22 loc) · 824 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
dotfile_path="$(cd "$(dirname "$0")" && pwd -P)"
# create zshrc.d and sync up
mkdir -p "${HOME}/zshrc.d"
rsync \
--recursive \
--progress \
--delete-after \
"${dotfile_path}/zshrc.d/" \
"${HOME}/zshrc.d"
# sync .zshrc
backup_suffix=".$(date +"%Y%m%d_%H%M").bkup"
rsync \
--progress \
--backup \
--suffix="$backup_suffix" \
"${dotfile_path}/.zshrc" \
"${HOME}/.zshrc"
# restart zsh
echo ""
echo "====================================="
echo "(:3」∠)_ Time to restart you shell..."
# TODO: need to find a more robust way to restart the shell