diff options
-rwxr-xr-x | find-deprecated-pkgs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/find-deprecated-pkgs b/find-deprecated-pkgs index c2e599c..3be7b0f 100755 --- a/find-deprecated-pkgs +++ b/find-deprecated-pkgs @@ -39,7 +39,7 @@ for r in $repos_armv7h; do done # Parabola mirrors, used to check [libre] and [pcr] packages -if [ $1 = parabola ]; then +if [[ $1 = parabola ]]; then for r in $repos_parabola; do mirrors+=(https://mirror.grapentin.org/parabola/$r/os/x86_64/) mirrors+=(https://mirror.grapentin.org/parabola/$r/os/i686/) @@ -72,6 +72,8 @@ probably also from their -multilib, -testing and -multilib-testing derivatives. This program only takes one argument, meaning that (for example) if you run \`${0##*/} parabola arch' only 'parabola' is considered EOM + +exit $STATUS } mkpkglist() { @@ -98,11 +100,17 @@ check(){ grep ^$p $arch_pkgs &> /dev/null || printf '%s was not found\n' "$p" done ;; + *) printf '%sError:%s %s is not a valid argument\n' \ + "$(tput setaf 1)" \ + "$(tput sgr0)" \ + "$1" + false + ;; esac } if [ -s $1 ]; then usage else - check $1 + check $1 || STATUS=$? usage fi |