From: pzurowski Date: Thu, 13 May 2004 22:28:51 +0000 (+0000) Subject: - cosmetics X-Git-Tag: auto/ac/rpm-4_3-0_20040107_29~17 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=519916c3251bc48fb40c50ffc3a19667045e439a;p=packages%2Frpm-build-tools.git - cosmetics - added "s" like "save" Changed files: adapter.sh -> 1.3 --- diff --git a/adapter.sh b/adapter.sh index 8835101..af8bf0a 100644 --- a/adapter.sh +++ b/adapter.sh @@ -1,19 +1,20 @@ #!/bin/bash -if [[ $# -ne 1 || ! -f $1 ]]; then +if [ $# -ne 1 -o ! -f "$1" ]; then echo "Usage: $0 filename" exit 1 fi ./adapter.awk "$1" > "$1.adapter" -diff -urN "$1" "$1.adapter"|less -echo -n "Are the changes OK? [yN] " +diff -u "$1" "$1.adapter"|less +echo -n "Are the changes OK? [yNs] " read -n 1 OK +echo -if [[ $OK == "y" || $OK == "Y" ]]; then +if [ "$OK" == "y" -o "$OK" == "Y" ]; then mv "$1.adapter" "$1" cvs ci "$1" -else +elif [ "$OK" != "s" -a "$OK" != "S" ];then rm "$1.adapter" fi