please shellcheck

This commit is contained in:
Daylin Morgan 2022-11-14 11:40:05 -06:00
parent e531d5ec48
commit eb3a1f6cc2

View file

@ -18,13 +18,13 @@ header() {
updates_output() {
notify=$1
if ! [[ -z $updates_arch ]]; then
if [[ -n $updates_arch ]]; then
header
echo "ARCH: $(echo "$updates_arch" | wc -l)"
header
[[ -z $notify ]] && echo "$updates_arch"
fi
if ! [[ -z $updates_aur ]]; then
if [[ -n $updates_aur ]]; then
header
echo "AUR: $(echo "$updates_aur" | wc -l)"
header
@ -35,7 +35,7 @@ updates_output() {
update_system() {
echo
read -p "Would you like to update? (y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
read -r -p "Would you like to update? (y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
pikaur -Syu --noedit --nodiff
}
@ -48,7 +48,7 @@ for opt in "$@"; do
notify=1
shift
;;
-* | --*)
-*)
echo "Invalid option: $opt"
usage
exit 1
@ -68,10 +68,10 @@ if [[ -z $updates_info ]]; then
exit 0
fi
if ! [[ -z $notify ]]; then
if [[ -n $notify ]]; then
notify-send -w "System Updates Available!" "$updates_info"
else
echo "System Updates Available!"
echo "nystem Updates Available!"
echo "$updates_info"
update_system
fi