Blame SOURCES/cscope-5-contrib-ocs-Fix-bashims-Closes-480591.patch

565b65
From bb7f25fad3cade493486a6287f5212cdfb6cce24 Mon Sep 17 00:00:00 2001
565b65
From: Jari Aalto <jari.aalto@cante.net>
565b65
Date: Sat, 8 May 2010 20:15:35 +0300
565b65
Subject: [PATCH 6/9] contrib/ocs: Fix bashims (Closes: #480591)
565b65
565b65
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
565b65
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
565b65
---
565b65
 contrib/ocs | 16 ++++++++--------
565b65
 1 file changed, 8 insertions(+), 8 deletions(-)
565b65
565b65
diff --git a/contrib/ocs b/contrib/ocs
565b65
index e924f4f..bd556b4 100755
565b65
--- a/contrib/ocs
565b65
+++ b/contrib/ocs
565b65
@@ -86,7 +86,7 @@ if [ ! -d ${SYSDIR} ]; then
565b65
 fi
565b65
 
565b65
 # Check that cscope is in PATH
565b65
-type cscope 1>/dev/null 2>&1
565b65
+which cscope 1>/dev/null 2>&1
565b65
 
565b65
 if [ $? -ne 0 ]
565b65
 then
565b65
@@ -167,8 +167,8 @@ create_list()
565b65
 
565b65
 	if [ "${FORCE}" != "Y" ]
565b65
 	then
565b65
-	    echo "\n${LIST}"
565b65
-	    echo "Update the library? <(Y)es, (N)o, (Q)uit> [n] \c"
565b65
+	    printf "\n${LIST}\n"
565b65
+	    printf "Update the library? <(Y)es, (N)o, (Q)uit> [n] "
565b65
 	    read x y
565b65
 	    case $x in
565b65
 		[Yy]* )	;;
565b65
@@ -176,9 +176,9 @@ create_list()
565b65
 		*)	return	;;
565b65
 	    esac
565b65
 	fi
565b65
-	echo "Updating library:\n  ${LIST} \c"
565b65
+	printf "Updating library:\n  ${LIST} "
565b65
     else
565b65
-	echo "Creating library:\n  ${LIST} \c"
565b65
+	printf "Creating library:\n  ${LIST} "
565b65
     fi
565b65
 
565b65
     (
565b65
@@ -196,7 +196,7 @@ create_list()
565b65
 				  -print
565b65
    ) | grep -v SCCS | sort -u > ${LIST}
565b65
 
565b65
-    echo "\n`cat ${LIST} | wc -l` files listed"
565b65
+    printf "\n`cat ${LIST} | wc -l` files listed\n"
565b65
 }
565b65
 
565b65
 #
565b65
@@ -210,7 +210,7 @@ exp_inc()
565b65
     then
565b65
 	for i in `cat ${theInc}`
565b65
 	do
565b65
-	    echo "-I $i \c"
565b65
+	    printf "-I $i "
565b65
 	done
565b65
     fi
565b65
 }
565b65
@@ -285,7 +285,7 @@ std_libs ${SYSDIR}$PWD
565b65
 
565b65
 DIR=$PWD
565b65
 if [ ! -n "${NOUPDATE}" -o -n "${SPECDEST}" ] ; then
565b65
-echo "Create new library? <(L)ocal, (H)ome, (S)ystem, (Q)uit> [q] \c"
565b65
+    printf "Create new library? <(L)ocal, (H)ome, (S)ystem, (Q)uit> [q] "
565b65
 
565b65
 # shellcheck disable=SC2034
565b65
 read x y
565b65
-- 
565b65
2.26.2
565b65