-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·37 lines (31 loc) · 904 Bytes
/
setup.sh
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
#!/bin/bash
set -euo pipefail
SOURCE_DIR="$(dirname "$0")"
function setup-config-file () {
local SOURCE_NAME=$1
local TARGET_NAME=${2:-.$SOURCE_NAME}
if [[ -e "$HOME/$TARGET_NAME" ]]; then
echo "File $TARGET_NAME already exists, not creating symbolic link"
else
mkdir -p "$(dirname "$HOME"/"$TARGET_NAME")"
ln -s "$SOURCE_DIR/$SOURCE_NAME" "$HOME/$TARGET_NAME"
echo "Created symbolic link $HOME/$TARGET_NAME"
fi
}
setup-config-file XCompose
setup-config-file Xresources
setup-config-file ansible.cfg
setup-config-file bashrc
setup-config-file bash_profile
setup-config-file config/bash
setup-config-file config/systemd
setup-config-file inputrc
setup-config-file profile
setup-config-file screenrc
setup-config-file tmux.conf
setup-config-file vimrc
setup-config-file xmonad/xmonad.hs
setup-config-file xsessionrc
setup-config-file zprofile
setup-config-file zshrc
exit 0