-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclup
More file actions
49 lines (45 loc) · 1018 Bytes
/
Copy pathclup
File metadata and controls
49 lines (45 loc) · 1018 Bytes
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
#!/bin/bash
declare -r myname='clup'
declare -r myver='1.1'
usage() {
echo "$myname : Clickable/configurable Update of Arch Linux"
echo "Usage : $myname [-hv]"
echo " -h/--help Display this text and exit"
echo " -v/--version Display version and exit"
echo "Configure commands used by $myname in /etc/${myname}.conf"
echo "Make it 'clickable' by putting cla.desktop a.k.a 'Clickable Update (clup)' on a launcher"
}
version() {
printf "%s %s\n" "$myname" "$myver"
}
if [ $# -gt 0 ]; then
case $1 in
-v|--version)
version; exit 0;;
-h|--help)
usage; exit 0;;
*)
usage; exit 1;;
esac
fi
source /etc/clup.conf
echo $clupdate
eval $clupdate
if [ -n "$(sudo find /etc -name "*pacnew" -print -quit)" ]
then
echo
echo $clupacnew
eval $clupacnew
fi
echo
echo ________________________________________
echo q: quit
echo c: continue working in this terminal
a=""
read -p "[q/c]? " a
until [[ "$a" =~ ^[qQcC] ]]
do
read -p "[q/c]? " a
done
[ "$a" = q ] && exit
[ "$a" = c ] && eval $clupshell