add command line option for nightly installs

This commit is contained in:
CJ van den Berg 2025-02-11 19:03:03 +01:00
parent 059128ead6
commit 62752b844f
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -11,6 +11,9 @@ for arg in "$@"; do
--alias|-a) --alias|-a)
add_alias=1 add_alias=1
;; ;;
--nightly|-n)
nightly=1
;;
*) *)
;; ;;
esac esac
@ -19,7 +22,7 @@ done
# prompt for nightly build option if interactive # prompt for nightly build option if interactive
if [ -t 0 ]; then if [ -t 0 ]; then
printf "do you want to install a Nightly build? [y/N]: " printf "do you want to install a Nightly build? [y/N]: "
read answer_nightly read -r answer_nightly
if [ "$answer_nightly" = "y" ] || [ "$answer_nightly" = "Y" ]; then if [ "$answer_nightly" = "y" ] || [ "$answer_nightly" = "Y" ]; then
nightly=1 nightly=1
fi fi
@ -97,7 +100,7 @@ if [ "$add_alias" -eq 1 ]; then
create_alias create_alias
elif [ -t 0 ]; then elif [ -t 0 ]; then
printf "do you want to create an alias 'f' for 'flow'? [y/N]: " printf "do you want to create an alias 'f' for 'flow'? [y/N]: "
read answer_alias read -r answer_alias
if [ "$answer_alias" = "y" ] || [ "$answer_alias" = "Y" ]; then if [ "$answer_alias" = "y" ] || [ "$answer_alias" = "Y" ]; then
create_alias create_alias
fi fi