added disp function and use it

This commit is contained in:
2022-11-18 13:43:10 +01:00
parent c5a43a3942
commit 4a975db1c0
10 changed files with 184 additions and 74 deletions

View File

@@ -23,18 +23,18 @@ dpkgs ()
local pkg=$1 && shift
count=$(( $count + 1 ))
[[ $count -gt 1 ]] &&
echo "*** Error: Please specify a package name, without space, eventually partial." &&
disp E "Please specify a package name, without space, eventually partial." &&
return 1
;;
esac
done
[[ $count -lt 1 ]] &&
echo "*** Error: Please specify a package name, without space, eventually partial." &&
disp E "Please specify a package name, without space, eventually partial." &&
return 1
[[ -x /usr/sbin/dpkg ]] &&
echo "*** Error: dpkg command seems unavialable." &&
disp E "dpkg command seems unavialable." &&
return 2
dpkg -l | grep $pkg