feat: deploy: 1 no tty option
This commit is contained in:
@@ -61,6 +61,10 @@ while [ $# -gt 0 ]; do
|
|||||||
target_host=$2
|
target_host=$2
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
-y|--yes)
|
||||||
|
assume_yes=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@@ -187,12 +191,16 @@ if [ "${push_deploy+x}" ]; then
|
|||||||
if [ "${server_init+x}" ]; then
|
if [ "${server_init+x}" ]; then
|
||||||
if [ "$is_target_host_nixos" -eq 1 ]; then
|
if [ "$is_target_host_nixos" -eq 1 ]; then
|
||||||
log warn 'target host already is nixos, are you really want to reinstall nixos?'
|
log warn 'target host already is nixos, are you really want to reinstall nixos?'
|
||||||
|
if [ "${assume_yes+x}" ]; then
|
||||||
|
log info 'assuming yes (-y/--yes), proceeding with reinstall'
|
||||||
|
else
|
||||||
printf 'This may delete all data [y/N]\n'
|
printf 'This may delete all data [y/N]\n'
|
||||||
read -r CONTINUE
|
read -r CONTINUE
|
||||||
if [ "$CONTINUE" != "y" ]; then
|
if [ "$CONTINUE" != "y" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
nixos-anywhere -- $@ # --flake .#x86_64-linux --target-host proxydoe
|
nixos-anywhere -- $@ # --flake .#x86_64-linux --target-host proxydoe
|
||||||
|
|||||||
Reference in New Issue
Block a user