-
Notifications
You must be signed in to change notification settings - Fork 5
/
install.sh
executable file
·58 lines (48 loc) · 1.52 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
coded_by='
In the name of Allah, the most Gracious, the most Merciful.
▓▓▓▓▓▓▓▓▓▓
░▓ Author ▓ Abdullah <https://abdullah.today>
░▓▓▓▓▓▓▓▓▓▓ YouTube <https://YouTube.com/AbdullahToday>
░░░░░░░░░░
'
# Install my configuration files for some programs I can't live without.
if grep -qs "ubuntu" /etc/os-release; then
os="ubuntu"
elif [[ -e /etc/debian_version ]]; then
os="debian"
elif [[ -e /etc/centos-release ]]; then
os="centos"
elif [[ -e /etc/fedora-release ]]; then
os="fedora"
elif [[ -e /etc/arch-release ]]; then
os="archlinux"
elif [[ -e /etc/gentoo-release ]]; then
os="gentoo"
elif [[ "$osTYPE" == "darwin"* ]]; then
os="macos"
else
echo "please install stow manually then try again."
exit
fi
if ! command -v stow >/dev/null 2>&1; then
if [[ "$os" = 'debian' ]]; then
sudo apt-get install -y stow git
elif [[ "$os" = 'ubuntu' ]]; then
sudo apt-get install -y stow git
elif [[ "$os" = 'macos' ]]; then
brew install stow git
elif [[ "$os" = 'centos' ]]; then
sudo yum -y install stow git
elif [[ "$os" = 'fedora' ]]; then
sudo yum -y install stow git
elif [[ "$os" = 'gentoo' ]]; then
sudo emerge stow git
elif [[ "$os" = 'archlinux' ]]; then
sudo pacman -S --noconfirm stow git
fi
fi
git clone https://gitlab.com/Abdullah/cfg.git ~/cfg
cd ~/cfg || exit
for d in */; do stow "${d%/}"; done
echo 'Congrats, you are done, Enjoy!'