-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup
More file actions
executable file
·52 lines (38 loc) · 779 Bytes
/
Copy pathsetup
File metadata and controls
executable file
·52 lines (38 loc) · 779 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
47
48
49
50
51
52
#!/usr/bin/env bash
cd $(dirname ${BASH_SOURCE[0]})
function confirm {
printf "Set up %-12s [Y/n]: " "${1}?"
read conf
[[ ! ${conf,,} =~ ^n ]]
}
ln -sf "$PWD/.bashrc" "$HOME/.bashrc"
ln -sf "$PWD/.bashrc" "$HOME/.zshrc"
ln -sf "$PWD/.profile" "$HOME/.profile"
ln -sf "$PWD/.profile" "$HOME/.bash_profile"
ln -sf "$PWD/.profile" "$HOME/.zprofile"
mkdir -p "$HOME/.local/bin"
ln -sfn "$PWD/scripts" "$HOME/.local/bin/scripts"
auto=(
alacritty
distrobox
git
vim
termux # skips itself if not in a termux session
tmux
)
optional=(
)
for i in ${auto[@]}; do
echo "Setting up ${i}"
${i}/setup
done
for i in ${optional[@]}; do
if confirm "${i}"; then
${i}/setup
fi
done
if [[ "$1" == "tools" ]]; then
shift
echo
scripts/dottools "$@"
fi