-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·28 lines (22 loc) · 759 Bytes
/
setup.sh
File metadata and controls
executable file
·28 lines (22 loc) · 759 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
#!/usr/bin/env bash
declare -a DOTFILES=("bashrc" "doom/init.el" "doom/config.el" "doom/packages.el" "gitconfig" "hidden" "inputrc" "profile")
declare -a SU_DOTFILES=("backups/general-backup.py")
declare -A LINK_NAMES=(
["backups/general-backup.py"]="/etc/cron.daily/backup"
["bashrc"]="$HOME/.bashrc"
["gitconfig"]="$HOME/.gitconfig"
["hidden"]="$HOME/.hidden"
["inputrc"]="$HOME/.inputrc"
["profile"]="$HOME/.profile"
["doom/init.el"]="$HOME/.doom.d/init.el"
["doom/config.el"]="$HOME/.doom.d/config.el"
["doom/packages.el"]="$HOME/.doom.d/packages.el"
)
for dotfile in "${SU_DOTFILES[@]}"
do
sudo ln -sbv "$(pwd)/$dotfile" "${LINK_NAMES[$dotfile]}"
done
for dotfile in "${DOTFILES[@]}"
do
ln -sbv "$(pwd)/$dotfile" "${LINK_NAMES[$dotfile]}"
done