Change flags to variables so that they can be passed through make

This commit is contained in:
Christoph Blecker
2018-01-25 13:30:30 -08:00
parent a107ae51af
commit f801f3f174
2 changed files with 5 additions and 20 deletions

View File

@@ -129,30 +129,15 @@ function run-checks {
done
}
SILENT=true
QUICK=false
while getopts ":vQ" opt; do
case ${opt} in
v)
SILENT=false
;;
Q)
QUICK=true
;;
\?)
echo "Invalid flag: -${OPTARG}" >&2
exit 1
;;
esac
done
SILENT=${SILENT:-false}
QUICK=${QUICK:-false}
if ${SILENT} ; then
echo "Running in silent mode, run with -v if you want to see script logs."
echo "Running in silent mode, run with SILENT=false if you want to see script logs."
fi
if ${QUICK} ; then
echo "Running in quick mode (-Q flag). Only fast checks will run."
echo "Running in quick mode (QUICK=true). Only fast checks will run."
fi
ret=0