diff options
Diffstat (limited to 'finish-ra')
-rwxr-xr-x | finish-ra | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/finish-ra b/finish-ra deleted file mode 100755 index 8836b9f..0000000 --- a/finish-ra +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -if [ -z "$1" ]; then - echo "Usage: $0 <comment>" 1>&2 - exit 1 -fi - -comment=$1 -perl -i -e '$host="'ra-$comment'"; $/=undef; $_=<>; s/^Host\s+(${host}$).*?((?=^Host)|\s*\Z)//gsm; print' ~/.ssh/config -sed -i "/ra-[0-8]\+-$comment-[0-9]\+$/d" ~/.ssh/authorized_keys -count=`ls ~/ra/ra-*-$comment-*.tar.gz 2>/dev/null | wc -l` -if [ $count -eq 0 ]; then - echo "No files with name $comment in ~/ra." 1>&2 - ls ~/ra-*-$comment-*.tar.gz - exit 1 -fi -mv -f ~/ra/ra-*-$comment-*.tar.gz ~/ra/ra-*-$comment-*-key ~/ra/old 2>/dev/null |