default mode is -ci now

This commit is contained in:
jash
2018-10-13 13:12:54 +02:00
committed by kexkey
parent c8a5e04d3a
commit 4b25263cd4

33
dist/setup.sh vendored
View File

@@ -127,7 +127,7 @@ INSTALL=0
RECREATE=0
TRACING=1
while getopts ":cir" opt; do
while getopts ":cirh" opt; do
case $opt in
r)
RECREATE=1
@@ -138,23 +138,28 @@ while getopts ":cir" opt; do
i)
INSTALL=1
;;
h)
echo "Use -c to configure and -i to install or -r to recreate from config.json." >&2
exit
;;
\?)
echo "Invalid option: -$OPTARG. Use -c to configure and -i to install" >&2
echo "Invalid option: -$OPTARG. Use -c to configure and -i to install or -r to recreate from config.json." >&2
;;
esac
done
if [[ $CONFIGURE == 0 && $INSTALL == 0 && RECREATE == 0 ]]; then
echo "Please use -c to configure, -i to install and -ci to do both. Use -r to recreate config files."
else
if [[ $CONFIGURE == 1 ]]; then
trace "Starting configuration phase"
configure $RECREATE
fi
if [[ $INSTALL == 1 ]]; then
trace "Starting installation phase"
install
fi
if [[ $CONFIGURE == 0 && $INSTALL == 0 && $RECREATE == 0 ]]; then
CONFIGURE=1
INSTALL=1
fi
if [[ $CONFIGURE == 1 ]]; then
trace "Starting configuration phase"
configure $RECREATE
fi
if [[ $INSTALL == 1 ]]; then
trace "Starting installation phase"
install
fi