浏览代码

fix responses in select

Grega Bremec 7 月之前
父节点
当前提交
1de15cdc1e
共有 2 个文件被更改,包括 9 次插入9 次删除
  1. 6 6
      code/get-logs.sh
  2. 3 3
      code/remove-logdirs.sh

+ 6 - 6
code/get-logs.sh

@@ -14,11 +14,11 @@ fi
 if [ ${ERRORS} -gt 0 ]; then
     echo "WARNING: Some logs are missing, chances are that you will get inconsistent results."
     echo "         Continue?"
-    select resp in "Y" "N"; do
-        if [ "${resp}" = "N" ]; then
+    select resp in "Yes" "No"; do
+        if [ "${resp}" = "No" ]; then
             echo "Exiting."
             exit 0
-        elif [ "${resp}" = "Y" ]; then
+        elif [ "${resp}" = "Yes" ]; then
             break
         fi
     done
@@ -26,11 +26,11 @@ fi
 
 if [ -e "${MYDIR}/producer.log" ] || [ -e "${MYDIR}/consumer.log" ]; then
     echo "WARNING: Existing logs will be overwritten. Do you want to continue?"
-    select resp in "Y" "N"; do
-        if [ "${resp}" = "N" ]; then
+    select resp in "Yes" "No"; do
+        if [ "${resp}" = "No" ]; then
             echo "Exiting."
             exit 0
-        elif [ "${resp}" = "Y" ]; then
+        elif [ "${resp}" = "Yes" ]; then
             break
         fi
     done

+ 3 - 3
code/remove-logdirs.sh

@@ -10,11 +10,11 @@ echo "WARNING: Removing log directories for Zookeeper, all brokers, and Kafka Co
 echo "         MAKE SURE THE PROCESSES ARE NOT RUNNING!"
 echo
 echo "Continue?"
-select resp in "Y" "N"; do
-    if [ "${resp}" = "N" ]; then
+select resp in "Yes" "No"; do
+    if [ "${resp}" = "No" ]; then
         echo "Exiting."
         exit 0
-    elif [ "${resp}" = "Y" ]; then
+    elif [ "${resp}" = "Yes" ]; then
         break
     fi
 done