From 92ac34b90aefe09c5ba151550ed7d44f746fc3b3 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Wed, 16 Feb 2022 17:05:02 +0000 Subject: [PATCH] create .ssh dir if it doesnt exist --- update-keys.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/update-keys.sh b/update-keys.sh index 0faa0ba..5d210a8 100755 --- a/update-keys.sh +++ b/update-keys.sh @@ -48,4 +48,10 @@ sort -u "$WORK_DIR/authorized_keys.tmp" > "$WORK_DIR/authorized_keys.wip" # cat "$WORK_DIR/authorized_keys.wip" +if [[ ! -d "$HOME/.ssh" ]]; then + + mkdir -p "$HOME/.ssh" + +fi + cp "$WORK_DIR/authorized_keys.wip" "$HOME/.ssh/authorized_keys" \ No newline at end of file