-
-
Save sonywork/8ca100c86d2e4ddb6bbb7977519e8d3a to your computer and use it in GitHub Desktop.
Revisions
-
putermancer revised this gist
Mar 4, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -18,4 +18,4 @@ elif [[ $1 == "SET_ENV_ONLY" ]]; then # if there is at least one non-git command, source this file in a new shell and create the 'gitolite' function else /bin/bash -c "source $0 shiftme SET_ENV_ONLY; $*" fi -
putermancer revised this gist
Mar 1, 2011 . 1 changed file with 10 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,21 @@ #!/bin/bash shift # get rid of -c # if no commands, just open a shell if [[ $# -eq 0 ]]; then /bin/bash -l # if the first arg is a git- command, that means it is something like git-push, etc... so forward it elif [[ $1 == git-* ]]; then ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@localhost $* # if the first arg is SET_ENV_ONLY, we sourced this file in order to set up the gitolite function elif [[ $1 == "SET_ENV_ONLY" ]]; then gitolite () { ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@localhost $* } # if there is at least one non-git command, source this file in a new shell and create the 'gitolite' function else /bin/bash -c "source $0 shiftme SET_ENV_ONLY; $*" fi -
putermancer revised this gist
Mar 1, 2011 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,11 +5,11 @@ if [[ $# -eq 0 ]]; then /bin/bash -l elif [[ $1 == git-* ]]; then echo "git command" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@localhost $* elif [[ $1 == "SET_ENV_ONLY" ]]; then echo "set the magicks" gitolite () { ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@localhost $* } else echo "source the bugger ($0)" -
putermancer revised this gist
Mar 1, 2011 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,5 +13,5 @@ elif [[ $1 == "SET_ENV_ONLY" ]]; then } else echo "source the bugger ($0)" /bin/bash -c "source $0 shiftme SET_ENV_ONLY; $*" fi -
putermancer revised this gist
Mar 1, 2011 . 1 changed file with 13 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,17 @@ #!/bin/bash shift # get rid of -c if [[ $# -eq 0 ]]; then echo "No params" /bin/bash -l elif [[ $1 == git-* ]]; then echo "git command" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@localhost $1 elif [[ $1 == "SET_ENV_ONLY" ]]; then echo "set the magicks" gitolite () { ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@localhost $1 } else echo "source the bugger ($0)" /bin/bash -c "source $0 SET_ENV_ONLY; $*" fi -
putermancer revised this gist
Feb 28, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ if [[ $# -gt 0 && $1 == git* ]]; then if [[ $GIT_COMMAND == gitolite* ]]; then GIT_COMMAND=${GIT_COMMAND#gitolite} fi ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@localhost $GIT_COMMAND $* elif [[ $# -gt 0 ]]; then $* else -
putermancer revised this gist
Feb 28, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ if [[ $# -gt 0 && $1 == git* ]]; then if [[ $GIT_COMMAND == gitolite* ]]; then GIT_COMMAND=${GIT_COMMAND#gitolite} fi ssh git@localhost $GIT_COMMAND $* elif [[ $# -gt 0 ]]; then $* else -
putermancer created this gist
Feb 28, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/bin/bash shift # get rid of -c if [[ $# -gt 0 && $1 == git* ]]; then GIT_COMMAND=$1 shift if [[ $GIT_COMMAND == gitolite* ]]; then GIT_COMMAND=${GIT_COMMAND#gitolite} fi ssh [email protected] $GIT_COMMAND $* elif [[ $# -gt 0 ]]; then $* else /bin/bash -l fi