]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- sh fixes: it's single '=' not '==' test, protect $# vars
authorTomasz Pala <gotar@pld-linux.org>
Sun, 15 Feb 2009 12:53:10 +0000 (12:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    banner.sh -> 1.7

banner.sh

index 5c92c5c48d4ca7ecd30cb7cd93da94a0454ff049..6db1623adce2de4c0093fb19765161578108dfcb 100644 (file)
--- a/banner.sh
+++ b/banner.sh
@@ -157,7 +157,7 @@ make_banner()
 }
 show_banner()
 {
-       cat $BANNERDIR/$1 >&$STDOUT
+       cat "$BANNERDIR/$1" >&$STDOUT
 }
 show_banners()
 {
@@ -166,8 +166,8 @@ show_banners()
        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 @@ while [ ! -z $1 ]; do
                        ;;
                -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
This page took 0.043527 seconds and 4 git commands to generate.