nixos-remote: only set -x if debug is enabled

This commit is contained in:
Jörg Thalheim 2022-12-09 15:26:44 +01:00
parent b3140d829d
commit d7b70fb4f9

View File

@ -1,6 +1,5 @@
#!/usr/bin/env bash
set -eufo pipefail
set -x
showUsage() {
cat <<USAGE
@ -21,6 +20,8 @@ Options:
skip copying ssh-keys to target system
* --kexec url
use another kexec tarball to bootstrap NixOS
* --debug
enable debug output
USAGE
}
@ -60,6 +61,9 @@ while [[ $# -gt 0 ]]; do
--no-ssh-copy-id)
no_ssh_copy=y
;;
--debug)
set -x
;;
*)
if [ -z ${ssh_connection+x} ]; then
if [[ "$1" =~ ^ssh:// ]]; then