Created
January 18, 2019 10:46
-
-
Save kaiix/ed224019d4fd6f6480492777f8f72480 to your computer and use it in GitHub Desktop.
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/bash | |
set -e | |
SSH_DIR="${HOME}/.ssh" | |
SSH_CONFIG_BASE64=`curl -s http://vault.in.ein.plus/keys/ein-ci` | |
mkdir -p "${SSH_DIR}" | |
chmod 0700 "${SSH_DIR}" | |
echo "Downloading private keys..." | |
echo "${SSH_CONFIG_BASE64}" | base64 -d | tar xf - -C "${SSH_DIR}" | |
chown -R `whoami` "${SSH_DIR}" | |
echo "Executing command: $@" | |
eval $@ | |
echo "Removing private keys..." | |
rm -rf ~/.ssh/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment