From 7034f689abd0368dc6eaa1440773d8f79d8fe98e Mon Sep 17 00:00:00 2001 From: Ivan Rako Date: Mon, 6 Jun 2005 10:08:01 +0000 Subject: [PATCH] r68: jos ispravaka cp_check_and_sed + changelog --- changelog.CARNet | 8 ++++++++ functions.sh | 4 ++++ 2 files changed, 12 insertions(+) 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" -- 1.7.10.4