shfmt & shellcheck suggestions

This commit is contained in:
Sandro - 2021-08-21 01:12:56 +02:00
parent 11d6b43a55
commit aa5a639d59
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 5 additions and 5 deletions

View File

@ -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"