-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·40 lines (35 loc) · 897 Bytes
/
install.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
38
39
40
#!/usr/bin/env sh
# Get the current directory of the script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
install() {
# Generic config path
config_path=$DIR/$1
# Get the host specific config path
hostname=$(cat /etc/hostname)
host_config_path=$DIR/$1-$hostname
if [ -d $host_config_path ]; then
echo "Installing $1 for $hostname"
rm -rf $HOME/.config/$1
ln -s $host_config_path $HOME/.config/$1
elif [ -d $config_path ]; then
echo "Installing $1"
rm -rf $HOME/.config/$1
ln -s $config_path $HOME/.config/$1
else
echo "Can't find $1 config dir"
fi
}
if [ $# -eq 0 ]; then
install kitty
install i3
install picom
install polybar
install rofi
install tmux
install wired
install autorandr
install fontconfig
install lazygit
else
install $1
fi