summaryrefslogtreecommitdiff
path: root/bin/kj-sync-keys.sh
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2015-11-23 11:39:09 -0500
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2015-11-23 11:39:09 -0500
commitac9711606c9f3edb53fab9471c049f274fa22527 (patch)
tree8b34f2db863f6243efd25c73812ebf8813f04093 /bin/kj-sync-keys.sh
parentedc1d61981781d44a584da0838c3cf847d63b40a (diff)
parentedbb0abbb8b4ee9c36c09ba16ce7dff345e4939c (diff)
Merge remote-tracking branch 'refs/remotes/origin/master'
Diffstat (limited to 'bin/kj-sync-keys.sh')
-rwxr-xr-xbin/kj-sync-keys.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/kj-sync-keys.sh b/bin/kj-sync-keys.sh
index b8be72d..1a3c455 100755
--- a/bin/kj-sync-keys.sh
+++ b/bin/kj-sync-keys.sh
@@ -13,12 +13,10 @@ declare -r tmpdir=$(mktemp -d /tmp/kj_sync_authorized_keys.XXXXX)
targets=(
root@orbekk.osl.trygveandre.net
tesuji.6.orbekk.com
- login.6.orbekk.com
- minecraft.6.orbekk.com
+ sabaki.6.orbekk.com
+ dragon.6.orbekk.com
login.pvv.ntnu.no
- aji.orbekk.com
- moyo.orbekk.com
- pi@photobox.6.orbekk.com
+ gote.orbekk.com
)
authorized_keys_file=$HOME/dotfiles/authorized_keys
if [[ ! -f "${authorized_keys_file}" ]]; then
@@ -32,7 +30,7 @@ add_keys_to_file() {
"/$begin_marker/"' { exit 0 } { print }' \
${filename} > ${filename}.header
awk \
- "/$end_marker/"' { should_output=1 } should_output { print }' \
+ "/$end_marker/"' { should_output=1 } !'"/$end_marker/"' { if (should_output) { print } }' \
${filename} > ${filename}.footer
cat "${filename}.header" > ${filename}