From: Ivan Rako Date: Fri, 26 Aug 2005 08:09:35 +0000 (+0000) Subject: r75: dodane jellyjeve ispravke. X-Git-Tag: debian/3.0.0~31 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=5d2f462427acf38aafc0e2d3a203ce0197b3eafc;p=carnet-upgrade.git r75: dodane jellyjeve ispravke. --- diff --git a/functions.sh b/functions.sh index cd0bdee..8ef8254 100644 --- a/functions.sh +++ b/functions.sh @@ -232,7 +232,7 @@ cp_check_and_sed() { fi ret=0 done - [ "$ret" -eq 2 -a "$grepret" ] && ret=1 || true + [ "$ret" -eq 2 -a "$grepret" ] && ret=1 return $ret } @@ -261,8 +261,12 @@ cp_mail () { quiet=1 shift fi - [ -n "$1" ] && pkg="$1" # barf if no package - [ -n "$2" ] && version=" $2" || true + if [ -n "$1" ]; then + pkg="$1" + else + return 1 # must have at least the package name as argument + fi + [ -n "$2" ] && version=" $2" if [ "$(echo $CP_NOTICE|wc -w)" -gt 0 ]; then [ -n "$quiet" ] || echo "Mailing upgrade output to root." CP_NOTICE="From: $pkg postinst script