Compare commits
2 Commits
7caf5b168c
...
fa471fdf9f
Author | SHA1 | Date |
---|---|---|
ray | fa471fdf9f | |
ray | dc3c53d7c8 |
|
@ -8,7 +8,8 @@ _show_help=0
|
||||||
|
|
||||||
if ! [ -f "$_target_file" ] ;
|
if ! [ -f "$_target_file" ] ;
|
||||||
then
|
then
|
||||||
echo "Error - file not found: $_target_file"
|
echo "notify-updates: cannot access '$_target_file': File not found"
|
||||||
|
echo "notify-updates: try executing 'pacman-update-count.sh'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,12 @@
|
||||||
_updates_available="0"
|
_updates_available="0"
|
||||||
_target_file="/tmp/pacman-update-count"
|
_target_file="/tmp/pacman-update-count"
|
||||||
_user="ray"
|
_user="ray"
|
||||||
|
_user_id=$(id -u)
|
||||||
|
|
||||||
|
if ! [ "$_user_id" -eq 0 ] ; then
|
||||||
|
echo "pacman-update-count.sh: insufficient priviliges: must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
pacman -Sy
|
pacman -Sy
|
||||||
_query_output=$(pacman -Qu)
|
_query_output=$(pacman -Qu)
|
||||||
|
|
Loading…
Reference in New Issue