Last active
August 29, 2015 14:21
-
-
Save cmouse/4dc3c24d5cdcaad0f681 to your computer and use it in GitHub Desktop.
NLNOG Ring key management
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -o errexit | |
git archive --format=tar HEAD | tar -Ox --wildcards '*.key' > $HOME/ssh-keys.new | |
if [ -s $HOME/ssh-keys.new ]; then | |
cat > $HOME/ssh-keys.tmp <<EOF | |
## THIS FILE IS AUTOGENERATED FROM GIT | |
## Do not edit by hand - instead add your key | |
## to <your company place> | |
## and read README.md for deployment instructions | |
## | |
EOF | |
cat $HOME/ssh-keys.new >> $HOME/ssh-keys.tmp | |
mv -f $HOME/ssh-keys.tmp $HOME/ssh-keys | |
fi | |
rm -f $HOME/ssh-keys.new | |
exec git update-server-info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment