* Don't create doas config if failed to install.

* Fix it better, previous change made it so that a value was required, could not just run setup.sh..
This commit is contained in:
2023-02-19 10:33:25 -06:00
committed by GitHub
parent b162731c29
commit 9736ee4bce
2 changed files with 10 additions and 8 deletions

View File

@ -52,16 +52,17 @@ while getopts ":lb:h" arg; do
esac
done
# Alert on historic usage of `setup.sh BRANCH`.
if [[ ! -z $1 && $1 != "-"* ]]; then
echo "ERROR: '$1' is not a valid option, please check your parameters and try again."
usage 1
fi
if [[ $branch == "" ]]; then
echo "Using default branch $BRANCH."
branch="$BRANCH"
fi
if [[ $1 != "-"* ]]; then
echo "ERROR: '$1' is not a valid option, please check your parameters and try again."
usage 1
fi
## Main ##
os="$(cat /etc/os-release)"