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

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