From: Ivan Rako Date: Mon, 6 Jun 2005 10:08:01 +0000 (+0000) Subject: r68: jos ispravaka cp_check_and_sed + changelog X-Git-Tag: debian/3.0.0~38 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=7034f689abd0368dc6eaa1440773d8f79d8fe98e;p=carnet-tools-cn.git r68: jos ispravaka cp_check_and_sed + changelog --- diff --git a/changelog.CARNet b/changelog.CARNet index c297e97..23e6cff 100644 --- a/changelog.CARNet +++ b/changelog.CARNet @@ -1,3 +1,11 @@ +carnet-tools-cn (2.4.1) testing; urgency=low + + * 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. diff --git a/functions.sh b/functions.sh index 85e9dd9..520007e 100644 --- a/functions.sh +++ b/functions.sh @@ -191,6 +191,10 @@ cp_backup_conffile() { 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" shift sedcmd="$1"