diff options
author | EUcancER <root@euer.krebsco.de> | 2012-05-30 12:45:11 +0200 |
---|---|---|
committer | EUcancER <root@euer.krebsco.de> | 2012-05-30 12:45:11 +0200 |
commit | 1e2f845e906e9290997365661fa6c753e3868702 (patch) | |
tree | b888d82e6d2d30801c9280d889bd4357a3aa949a /punani/bin | |
parent | 24aad38c684c0a8bdd166aeb2bb8bbbeac22c61e (diff) |
fix package manager order
Diffstat (limited to 'punani/bin')
-rwxr-xr-x | punani/bin/punani | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/punani/bin/punani b/punani/bin/punani index 97c7ac85..23ba5e00 100755 --- a/punani/bin/punani +++ b/punani/bin/punani @@ -8,26 +8,28 @@ PKGS="$*" ## find package manager if ! :; then : # dummy case, so the rest has a common format -elif for PACKER_CMD in yum +elif for PACKER_CMD in aptitude apt-get do type $PACKER_CMD 2>/dev/null 1>&2 && break; done; then INSTALL_PARAM='-y install' REMOVE_PARAM='-y remove' -elif for PACKER_CMD in brew - do type $PACKER_CMD 2>/dev/null 1>&2 && break; done; then - INSTALL_PARAM='install' - REMOVE_PARAM='remove' - elif for PACKER_CMD in bauerbill packer yaourt pacman do type $PACKER_CMD 2>/dev/null 1>&2 && break; done; then INSTALL_PARAM='--noconfirm -S --needed' REMOVE_PARAM='-Rcs' -elif for PACKER_CMD in aptitude apt-get +elif for PACKER_CMD in yum do type $PACKER_CMD 2>/dev/null 1>&2 && break; done; then INSTALL_PARAM='-y install' REMOVE_PARAM='-y remove' +elif for PACKER_CMD in brew + do type $PACKER_CMD 2>/dev/null 1>&2 && break; done; then + INSTALL_PARAM='install' + REMOVE_PARAM='remove' + + + else echo "Error 2: no known package manager found; no punani for you!" >&2 exit 23 |