From 32b3df2a7625efaa8c745bc7ccbdbb8366811465 Mon Sep 17 00:00:00 2001 From: sanine Date: Fri, 23 Jun 2023 21:57:10 -0500 Subject: fix loop bug --- ssh/update-keys.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 ssh/update-keys.sh (limited to 'ssh') diff --git a/ssh/update-keys.sh b/ssh/update-keys.sh old mode 100644 new mode 100755 index 5a56392..28e5e75 --- a/ssh/update-keys.sh +++ b/ssh/update-keys.sh @@ -3,7 +3,7 @@ SSH_DIR="$HOME/.ssh" KEYS_DIR="$SSH_DIR/authorized_keys.d" -KEYS_FILE="SSH_DIR/authorized_keys" +KEYS_FILE="$SSH_DIR/authorized_keys" if [ ! -d "$KEYS_DIR" ]; then echo "creating $KEYS_DIR/" @@ -14,6 +14,6 @@ if [ -e "$KEYS_FILE" ]; then mv "$KEYS_FILE" "$KEYS_FILE.bak" fi -for file in "$KEYS_DIR/*.pub"; do +for file in "$KEYS_DIR/"*.pub; do cat "$file" >> "$KEYS_FILE" done -- cgit v1.2.1