commit:     9133fc879c354c0889e775d6a42c3fa21efe8fe7
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 10 19:51:20 2014 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Sep 10 19:51:20 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=9133fc87

catalyst-auto: clean up usage a bit

---
 tools/catalyst-auto | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tools/catalyst-auto b/tools/catalyst-auto
index aa4ec1d..3aa98b2 100755
--- a/tools/catalyst-auto
+++ b/tools/catalyst-auto
@@ -19,10 +19,10 @@ testing=0
 set -o pipefail
 
 usage() {
-  msg=$1
+  local msg=$1
 
   if [ -n "${msg}" ]; then
-    echo -e "${msg}\n";
+    printf "%b\n\n" "${msg}"
   fi
 
   cat <<EOH
@@ -104,8 +104,7 @@ do
       testing=1
       ;;
     -*)
-      echo "You have specified an invalid option: ${a}"
-      usage
+      usage "ERROR: You have specified an invalid option: ${a}"
       exit 1
       ;;
     esac
@@ -113,7 +112,7 @@ done
 
 # Make sure all required values were specified
 if [ -z "${config_file}" -o ! -e "${config_file}" ]; then
-  usage "You must specify a valid config file to use"
+  usage "ERROR: You must specify a valid config file to use"
   exit 1
 fi
 

Reply via email to