-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathenv-setup.sh
executable file
·52 lines (44 loc) · 1015 Bytes
/
env-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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
echo -n "Linking aliases file ($HOME/.b00merang_aliases)... "
if [ ! -f $HOME/.b00merang_aliases ]
then
ln -s $PWD/b00merang_aliases $HOME/.b00merang_aliases
fi
echo "Done"
if [ ! -f $HOME/.bashrc ]
then
echo "source $HOME/.b00merang_aliases" >>$HOME/.bashrc
fi
if [ ! -f $HOME.zshrc ]
then
echo "source $HOME/.b00merang_aliases" >>$HOME/.zshrc
fi
echo "Linking commands ($HOME/.local/bin)... "
if [ ! -d $HOME/.local ]
then
mkdir $HOME/.local
elif [ ! -d $HOME/.local/bin ]
then
mkdir $HOME/.local/bin
fi
for file in bin/*
do
echo "Linking $file"
ln -s "$PWD/$file" $HOME/.local/bin/
done
echo "Done"
read -p "Install packages? (y/n/): " yesno
if [ $yesno == "y" ]
then
if [ -f /bin/pacman ]
then
sudo pacman -Sy sassc gtk3-demos gtk4-demos imagemagick
elif [ -f /bin/apt ]
then
sudo apt install -y sassc gtk-3-examples imagemagick
elif [ -f /bin/dnf ]
then
sudo dnf install -y sassc gtk3-devel gtk4-devel gtk4-devel-tools ImageMagick
fi
fi
echo "Done."