catalyst-auto: clean up usage a bit
This commit is contained in:
parent
7edbafbe87
commit
9133fc879c
1 changed files with 4 additions and 5 deletions
|
@ -19,10 +19,10 @@ testing=0
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
msg=$1
|
local msg=$1
|
||||||
|
|
||||||
if [ -n "${msg}" ]; then
|
if [ -n "${msg}" ]; then
|
||||||
echo -e "${msg}\n";
|
printf "%b\n\n" "${msg}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<EOH
|
cat <<EOH
|
||||||
|
@ -104,8 +104,7 @@ do
|
||||||
testing=1
|
testing=1
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "You have specified an invalid option: ${a}"
|
usage "ERROR: You have specified an invalid option: ${a}"
|
||||||
usage
|
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -113,7 +112,7 @@ done
|
||||||
|
|
||||||
# Make sure all required values were specified
|
# Make sure all required values were specified
|
||||||
if [ -z "${config_file}" -o ! -e "${config_file}" ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue