[packages/adapter: 123/631] - cosmetics - added "s" like "save"

glen glen at pld-linux.org
Mon Sep 12 19:44:46 CEST 2016


commit 3cbd382d4dea9e5c1b2513a955cbd738c3659930
Author: pzurowski <pzurowski at pld-linux.org>
Date:   Thu May 13 22:28:51 2004 +0000

    - cosmetics
    - added "s" like "save"
    
    Changed files:
        adapter.sh -> 1.3

 adapter.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list