mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-26 09:05:13 +01:00
default mode is -ci now
This commit is contained in:
33
dist/setup.sh
vendored
33
dist/setup.sh
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user