Permalink
Browse files

fix package manager order

  • Loading branch information...
1 parent 24aad38 commit 1e2f845e906e9290997365661fa6c753e3868702 EUcancER committed May 30, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −7 punani/bin/punani
View
16 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

0 comments on commit 1e2f845

Please sign in to comment.