From: Ivan Rako Date: Tue, 7 Jun 2005 07:10:15 +0000 (+0000) Subject: r70: ispravke cp_check_and_sed X-Git-Tag: debian/3.0.0~36 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=45351df2bc9832d4ce2f9ee6a2b19370236e89a8;p=carnet-upgrade.git r70: ispravke cp_check_and_sed i. --- diff --git a/changelog.CARNet b/changelog.CARNet index 23e6cff..fe7eb21 100644 --- a/changelog.CARNet +++ b/changelog.CARNet @@ -1,16 +1,13 @@ -carnet-tools-cn (2.4.1) testing; urgency=low +carnet-tools-cn (2.4) testing; urgency=low + * Kozmeticke ispravke. + * Dodana cp_check_and_backup funkcija. * Ispravak buga funkcije cp_check_and_sed (ako pukne sed, datoteka ostane prazna) * Funkcija cp_check_and_sed se prekida ako nedostaju potrebni argumenti -- Ivan 'ico' Rako Mon, 6 Jun 2005 12:01:43 +0200 -carnet-tools-cn (2.4) testing; urgency=low - - * Kozmeticke ispravke. - * Dodana cp_check_and_backup funkcija. - carnet-tools-cn (2.3.1) testing; urgency=low * dodana ovisnost o mail-transport-agent i sed 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