SOURCES: banner.sh - sh fixes: it's single '=' not '==' test, protect $# vars
gotar
gotar at pld-linux.org
Sun Feb 15 13:53:15 CET 2009
Author: gotar Date: Sun Feb 15 12:53:15 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- sh fixes: it's single '=' not '==' test, protect $# vars
---- Files affected:
SOURCES:
banner.sh (1.6 -> 1.7)
---- Diffs:
================================================================
Index: SOURCES/banner.sh
diff -u SOURCES/banner.sh:1.6 SOURCES/banner.sh:1.7
--- SOURCES/banner.sh:1.6 Mon Feb 27 09:55:11 2006
+++ SOURCES/banner.sh Sun Feb 15 13:53:10 2009
@@ -157,7 +157,7 @@
}
show_banner()
{
- cat $BANNERDIR/$1 >&$STDOUT
+ cat "$BANNERDIR/$1" >&$STDOUT
}
show_banners()
{
@@ -166,8 +166,8 @@
done
}
######################################################## MAIN ########
-while [ ! -z $1 ]; do
- case $1 in
+while [ -n "$1" ]; do
+ case "$1" in
-a|--all)
ALL_BANNERS=1
;;
@@ -187,13 +187,13 @@
;;
-m|--make|-M)
NEED_BANNER_LIST=0
- if [[ $2 != */* ]]; then
+ if [[ "$2" != */* ]]; then
NEW_BANNER="$BANNERDIR/${2##*/}"
else
NEW_BANNER="$2"
fi
ACTION="make"
- if [ "$1" == "-M" ];then
+ if [ "$1" = "-M" ];then
NEW_APPEND=1
else
NEW_APPEND=0
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/banner.sh?r1=1.6&r2=1.7&f=u
More information about the pld-cvs-commit
mailing list