shfmt & shellcheck suggestions
This commit is contained in:
parent
11d6b43a55
commit
aa5a639d59
|
@ -4,12 +4,12 @@ set -e
|
|||
|
||||
TARGET=$1
|
||||
if [ -z "$TARGET" ]; then
|
||||
echo "Usage: $0 <host.hq.c3d2.de>"
|
||||
exit 1
|
||||
echo "Usage: $0 <host.hq.c3d2.de>"
|
||||
exit 1
|
||||
fi
|
||||
HOSTNAME=$(echo $TARGET|cut -d . -f 1)
|
||||
HOSTNAME=$(echo "$TARGET" | cut -d . -f 1)
|
||||
|
||||
rsync -az $(dirname $0) root@$TARGET:nix-config
|
||||
rsync -az "$(dirname "$0")" root@"$TARGET":nix-config
|
||||
|
||||
echo "$HOSTNAME> nixos-rebuild switch"
|
||||
exec ssh root@$TARGET "nixos-rebuild --flake ./nix-config#$HOSTNAME switch"
|
||||
exec ssh root@"$TARGET" "nixos-rebuild --flake ./nix-config#$HOSTNAME switch"
|
||||
|
|
Loading…
Reference in New Issue