diff options
author | Peter Palfrader <peter@palfrader.org> | 2006-04-29 15:14:45 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2006-04-29 15:14:45 +0000 |
commit | 20115536b52a07f7f7e5465d56ac431ff73843b6 (patch) | |
tree | d756545cee58e58722f6171c2cd776fbd13347c3 /Link-Them | |
parent | 7f0fbaa888bb7e485fc9d73d6c8af7c9dd407e8f (diff) |
Add a link script
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@73 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'Link-Them')
-rw-r--r-- | Link-Them | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Link-Them b/Link-Them new file mode 100644 index 0000000..6e743f2 --- /dev/null +++ b/Link-Them @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +cd "`dirname $0`" + +DATE="`date +'%Y%m%d'`" +DIR="`pwd`" + +for file in bash_profile bashrc screenrc vimrc zshrc; do + if ! [ -l "$HOME/.$file" ]; then + [ -e "$HOME/.$file" ] && mv "$HOME/.$file" "$HOME/.$file-$DATE" + ln -s "$DIR/$file" "$HOME/.$file" + fi +done + +if ! [ -e "$HOME/.ssh/authorized_keys" ]; then + gpg --keyserver keyserver.noreply.org --recv 94C09C7F + if ! gpg --status-fd=1 --verify ssh/authorized_keys.asc | grep '\[GNUPG:\] VALIDSIG C5DED518FD5A040B3EE9615FCFF71CB3AFA44BDD'; then + echo "ssh authorized keys failed verification" >&2 + exit 1 + fi + umask 077 + [ -d "$HOME/.ssh" ] || mkdir "$HOME/.ssh" + cp ssh/authorized_keys $HOME/.ssh +fi |