[packages/adapter: 126/631] - just sh, no bashizm

glen glen at pld-linux.org
Mon Sep 12 19:45:01 CEST 2016


commit d1c5197757086a0ded245e241b4752fa113ee356
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Jun 27 13:02:26 2004 +0000

    - just sh, no bashizm
    
    Changed files:
        adapter.sh -> 1.6

 adapter.sh | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/adapter.sh b/adapter.sh
index 9104be5..c36671d 100644
--- a/adapter.sh
+++ b/adapter.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 if [ $# -ne 1 -o ! -f "$1" ]; then
   echo "Usage: $0 filename"
@@ -6,17 +6,21 @@ if [ $# -ne 1 -o ! -f "$1" ]; then
 fi
 
 ./adapter.awk "$1" > "$1.adapter"
-diff -u "$1" "$1.adapter"|less
+diff -u "$1" "$1.adapter" | less
 echo -n "Are the changes OK? [yNso] "
 
-read -n 1 OK
-echo
+read OK
 
 if [ "$OK" = "y" -o "$OK" = "Y" ]; then
+  echo "Committing..."
   mv "$1.adapter" "$1"
   cvs ci "$1"
-elif [ "$OK" = "o" -a "$OK" = "O" ];then
+elif [ "$OK" = "o" -o "$OK" = "O" ];then
+  echo "Saving changes..."
   mv "$1.adapter" "$1"
 elif [ "$OK" != "s" -a "$OK" != "S" ];then
+  echo "Ignoring changes..."
   rm "$1.adapter"
+else
+  echo "Did nothing."
 fi
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list