-
Notifications
You must be signed in to change notification settings - Fork 1
/
aur.sh
executable file
·94 lines (81 loc) · 2.34 KB
/
aur.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env bash
################################
function press_a_key_to_continue {
read -rp ">> Press enter to continue or CTRL-C to abort."
}
function is_arch {
source /etc/os-release
case $ID in
arch) # Arch
echo ">> get-eggs: OK, is Arch"
;;
arcolinux) # ArcoLinux
echo ">> get-eggs: OK, is ArcoLinux"
;;
artix) # Artix
echo ">> get-eggs: KO, Artix is not compatible with penguins-eggs!"
exit
;;
blackarch) # BlackArch
echo ">> get-eggs: OK, is BlackArch"
;;
blendos) # BlendOS
echo ">> get-eggs: OK, is BlendOS"
;;
crystal) # Crystal
echo ">> get-eggs: OK, is Crystal"
;;
endeavouros) # EndeavourOS)
echo ">> get-eggs: OK, is EndeavourOS"
;;
garuda) # Garuda
echo ">> get-eggs: OK, is Garuda"
;;
rebornos) # RebornOS
echo ">> get-eggs: OK, is RebornOS"
;;
*)
echo ">> AUR: is for Arch and derivatives"
exit
esac
}
function is_aur {
if grep -Fxq "[chaotic-aur]" /etc/pacman.conf; then
echo ">> get-eggs: chaotic-aur already present!"
exit
fi
}
function main {
is_arch
is_aur
echo ""
echo ">> get-eggs: add spare tools..."
echo ""
pacman -S bash-completion \
dialog \
man-db \
nano \
openssh \
wget
echo ""
echo ">> get-eggs: add AUR repository..."
echo ""
echo
pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
pacman-key --lsign-key 3056513887B78AEB
pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
echo "[chaotic-aur]" >> /etc/pacman.conf
echo "Include = /etc/pacman.d/chaotic-mirrorlist" >> /etc/pacman.conf
echo ""
echo ">> get-eggs: Installing penguins-eggs..."
echo ""
pacman -Sy penguins-eggs
echo ""
read -rp ">> get-eggs: press a key to edit /etc/sudoers"
echo ""
export EDITOR=nano
visudo
eggs dad -d
echo ">> get-eggs: finished! You can remove it"
}
main