Edit 'update' script
This commit is contained in:
parent
13a3e6a43d
commit
e3f6081939
@ -1,14 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CHECK="$(printf "Yes\nNo\nShow packages" | rofi -dmenu -i -p 'Do you want to make packages update?' -l 3)"
|
action="$(printf " Update\n Show packages" | \
|
||||||
if [ -z "$CHECK" ]; then exit; fi
|
rofi -dmenu -i -p 'Updater' -l 2 -width 200)"
|
||||||
|
[ ! "$action" ] && exit
|
||||||
|
|
||||||
|
case "$action" in
|
||||||
|
" Update")
|
||||||
|
export PASS="$(printf | dmenu -P -p "Enter password: " -h 24)"
|
||||||
|
[ ! "$PASS" ] && exit
|
||||||
|
st -e sh -c "echo $PASS | sudo -S -v && clear; sudo pacman -Su --noconfirm"
|
||||||
|
;;
|
||||||
|
|
||||||
|
" Show packages")
|
||||||
|
packages() { pacman -Qu; }
|
||||||
|
if [ "$(packages)" -gt 0 ]; then
|
||||||
|
pacman -Qu | dmenu -l 50
|
||||||
|
else notify-send "Nothing to update!"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
case "$CHECK" in
|
|
||||||
Yes)
|
|
||||||
export PASS=$(printf | dmenu -P -p "Enter password: " -h 24)
|
|
||||||
if [ -z "$PASS" ]; then exit; fi
|
|
||||||
st -e sh -c 'echo $PASS | sudo -S -v && clear; sudo pacman -Su --noconfirm';;
|
|
||||||
"Show packages")
|
|
||||||
pacman -Qu | dmenu -l 50 ;;
|
|
||||||
*) exit
|
*) exit
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user