-
Notifications
You must be signed in to change notification settings - Fork 0
/
check-aur
31 lines (27 loc) · 1.38 KB
/
check-aur
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
#!/bin/sh
##Common files
manjaro=/usr/share/icons/manjaro/maia/maia.svg
warning=/usr/share/icons/hicolor/40x40/status/aur-warning.png
autostart=$HOME/.config/autostart/check-aur.desktop
# Don't run in live environment
if [[ ! -d /run/miso/bootmnt/manjaro ]]; then
# Check if wrapper install hook was triggered
while [ ! -f /.check-aur ]; do
sleep 60
done
# Display warning
sleep 60
yad --title="WARNING" --window-icon=$manjaro --on-top --center --image=$warning --width=475 --fixed \
--text="\n\nAUR access detected.\n\nIf you would like to learn more about AUR features and risks (\!)\npress \'OK\' to be redirected to the Wiki page.\nIf you already know what the AUR is, press \'Cancel\'.\n" --text-align=left --cancel-label="Cancel" --ok-label="Ok";
if [ $? != 1 ] ; then
# Display Wiki page
xdg-open https://wiki.manjaro.org/index.php/Arch_User_Repository
# Ask for confirmation
yad --title="WARNING" --window-icon=$manjaro --on-top --center --image=$warning --width=505 --fixed \
--text="\n\nRead these pages carefully before installing programs from the AUR\!\n\nPress \'OK\' to confirm that you have been informed\nabout the risks of using the AUR.\n" --text-align=left --button=gtk-ok:0;
if [ $? == 1 ] ; then
exit 1
fi
fi
rm $autostart
fi