projects
/
carnet-tools-cn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ea01a24
)
r75: dodane jellyjeve ispravke.
author
Ivan Rako
<Ivan.Rako@CARNet.hr>
Fri, 26 Aug 2005 08:09:35 +0000
(08:09 +0000)
committer
Ivan Rako
<Ivan.Rako@CARNet.hr>
Fri, 26 Aug 2005 08:09:35 +0000
(08:09 +0000)
functions.sh
patch
|
blob
|
history
diff --git
a/functions.sh
b/functions.sh
index
cd0bdee
..
8ef8254
100644
(file)
--- a/
functions.sh
+++ b/
functions.sh
@@
-232,7
+232,7
@@
cp_check_and_sed() {
fi
ret=0
done
fi
ret=0
done
- [ "$ret" -eq 2 -a "$grepret" ] && ret=1 || true
+ [ "$ret" -eq 2 -a "$grepret" ] && ret=1
return $ret
}
return $ret
}
@@
-261,8
+261,12
@@
cp_mail () {
quiet=1
shift
fi
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 <root>
if [ "$(echo $CP_NOTICE|wc -w)" -gt 0 ]; then
[ -n "$quiet" ] || echo "Mailing upgrade output to root."
CP_NOTICE="From: $pkg postinst script <root>