diff options
author | tv <tv@iiso> | 2011-11-20 01:29:10 +0100 |
---|---|---|
committer | tv <tv@iiso> | 2011-11-20 01:29:10 +0100 |
commit | 98c73906645364805fe512bec3856db6706f6a78 (patch) | |
tree | 7888aafc16b06348348351bc4514f524ceaaba58 | |
parent | 63df8cd12335300e5af7940a80fa04d660bb04ec (diff) |
//punani: fix bug when wget (+ set -e) GETs no OK
-rwxr-xr-x | punani/bin/punani | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/punani/bin/punani b/punani/bin/punani index 7be91db4..b96539ff 100755 --- a/punani/bin/punani +++ b/punani/bin/punani @@ -9,7 +9,7 @@ if [ $# -ne 2 ];then fi ## find package manager -if ! :; then : # dummy, so the rest has a common format +if ! :; then : # dummy case, so the rest has a common format elif for PACKER_CMD in yum do type $PACKER_CMD 2>/dev/null 1>&2 && break; done; then @@ -36,14 +36,15 @@ else exit 23 fi - -# find the package name +## find package name PKG="$2" -RESOLVED=`wget -O- $TIGHTNANI_HOST/$PACKER_CMD/$PKG 2>/dev/null` +RESOLVED=`wget -O- $TIGHTNANI_HOST/$PACKER_CMD/$PKG 2>/dev/null || :` if [ ! "$RESOLVED" ];then - echo "Could not resolve your requested package, bailing out!" + echo "Error 2: could not resolve '$PKG'; no punany for you!" >&2 exit 23 fi + +## dispatch case "$1" in install) exec $PACKER_CMD $INSTALL_PARAM $RESOLVED |