X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=blobdiff_plain;f=functions.sh;h=4b3013d1ca07333c32589bac60d16adfc1c768d5;hb=45351df2bc9832d4ce2f9ee6a2b19370236e89a8;hp=d1a1e7cc9040ef33fdf9af7eee35c45ed7899fbb;hpb=b0b75f0bad57bdababacdd7781ae3f2133f6dfb8;p=carnet-tools-cn.git diff --git a/functions.sh b/functions.sh index d1a1e7c..4b3013d 100644 --- a/functions.sh +++ b/functions.sh @@ -192,7 +192,6 @@ cp_check_and_sed() { [ "$CP_SCRIPT_DEBUG" ] && set -vx local s sedcmd grepret ret i if [ -z "$3" ]; then - echo "Usage: cp_check_and_sed [file ...]" 2>&1 return 1 fi s="$1" @@ -209,7 +208,7 @@ cp_check_and_sed() { fi [ -h "$i" ] && i=$(readlink -f "$i") sed "$sedcmd" "$i" > "$i.dpkg-tmp" - if [ ! "$?" = "0" ]; then + if [ $? -ne 0 ]; then rm "$i.dpkg-tmp" echo "cp_check_and_sed: Problem with sed" 1>&2 return 5