aboutsummaryrefslogtreecommitdiffstats
path: root/build-hcloud-snapshot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-hcloud-snapshot.sh')
-rwxr-xr-xbuild-hcloud-snapshot.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/build-hcloud-snapshot.sh b/build-hcloud-snapshot.sh
index 40f3dcb..00ec32d 100755
--- a/build-hcloud-snapshot.sh
+++ b/build-hcloud-snapshot.sh
@@ -16,7 +16,7 @@ SCRIPTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
VERSION=7.9
ARCH=amd64
-PUBLIC_SSH_KEY="$HOME/.ssh/id_rsa.pub"
+SSH_KEY="default-key"
main() (
parse_args "$@"
@@ -29,7 +29,7 @@ main() (
-var "image_path=${img_path}.zst" \
-var "version=$VERSION" \
-var "arch=$ARCH" \
- -var "ssh_key=$(get_ssh_key_name "$PUBLIC_SSH_KEY")" \
+ -var "ssh_key=$SSH_KEY" \
.
)
@@ -44,8 +44,8 @@ parse_args() {
ARCH="$2"
shift 2
;;
- --public-ssh-key)
- PUBLIC_SSH_KEY="$2"
+ --ssh-key)
+ SSH_KEY="$2"
shift 2
;;
*)
@@ -62,8 +62,4 @@ build_compressed_image() (
fi
)
-get_ssh_key_name() {
- awk '{print $3}' "$1"
-}
-
main "$@"