summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2015-11-25 09:41:42 -0500
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2015-11-25 09:41:42 -0500
commitf64df3a4e474d9a6ef2a69f8f6b6867a6e8d3d10 (patch)
tree2689e6cc9c60db971e132578133b2c089697319b /bin
parent769d3c6a16f7a0837d9c0461a46e1b352f9daa5d (diff)
parent9f6265697a2184fc6050f8b845c8bb43ddc84c2d (diff)
Merge branch 'master' of tesuji.6.orbekk.com:/storage/projects/dotfiles
Diffstat (limited to 'bin')
-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}