Add option to skip mimic build in dev_setup.sh
Add a -sm "Skip mimic" option to dev_setup.sh which
will always prevent the download and complile of
the original Mimic.  By default, we still want to
do this all the time, but there are situations where
it is convenient to skip this time-consuming step.
@@ -50,6 +50,7 @@ Usage: dev_setup.sh [options]
Options:
-r, --allow-root Allow to be run as root (e.g. sudo)
-fm Force mimic build
+ -sm Skip mimic build
-h, --help Show this message
-n, --no-error Do not exit on error (use this flag with caution, usually not necessary)
@@ -60,6 +61,7 @@ not as root/sudo."
opt_forcemimicbuild=false
opt_allowroot=false
+opt_skipmimicbuild=false
for var in "$@" ; do
if [[ ${var} == "-h" ]] || [[ ${var} == "--help" ]] ; then
@@ -78,6 +80,9 @@ for var in "$@" ; do
# exit on any error
set +Ee
fi
+ if [[ ${var} == "-sm" ]] ; then
+ opt_skipmimicbuild=true
+ fi
done
if [ $(id -u) -eq 0 ] && [ "${opt_allowroot}" != true ] ; then
@@ -208,9 +213,13 @@ else
fi
if [ "$has_mimic" == "" ]; then
+ if [[ ${opt_skipmimicbuild} == true ]] ; then
+ build_mimic="n"
+ else
build_mimic="y"
fi
fi
+fi
if [ ! -x "${VIRTUALENV_ROOT}/bin/activate" ] ; then
install_venv
