Created
October 7, 2011 10:01
-
-
Save aarvay/1269944 to your computer and use it in GitHub Desktop.
Bash script to manage fake git accounts
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 | |
#Script to switch between the orginal git account and the fake one. | |
#Setup | |
#===== | |
# Have two folders named "key_backup" and "fake_backup" in ~/.ssh/ | |
# The original account's pubkey will be stored in key_backup/ and fake account's in fake_backup/ | |
# --Aarvay | |
[ "$(ls -A ~/.ssh/fake_backup)" ] && { mv ~/.ssh/id_rsa* ~/.ssh/key_backup/; mv ~/.ssh/fake_backup/id_rsa* ~/.ssh/; echo "Switched to Fake Account!"; } || { mv ~/.ssh/id_rsa* ~/.ssh/fake_backup/; mv ~/.ssh/key_backup/id_rsa* ~/.ssh/; echo "Switched to Original Account!"; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment