-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
##GIT START | ||
|
||
<Files "git.sh"> | ||
Order Allow,Deny | ||
deny from all | ||
</Files> | ||
|
||
<Files ".gitignore"> | ||
Order Allow,Deny | ||
deny from all | ||
</Files> | ||
|
||
##GIT END | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# The MIT License (MIT) | ||
# Copyright (c) 2013 Alvin Abad | ||
|
||
if [ $# -eq 0 ]; then | ||
echo "Git wrapper script that can specify an ssh-key file | ||
Usage: | ||
git.sh -i ssh-key-file git-command | ||
" | ||
exit 1 | ||
fi | ||
|
||
# remove temporary file on exit | ||
trap 'rm -f /tmp/.git_ssh.$$' 0 | ||
|
||
if [ "$1" = "-i" ]; then | ||
SSH_KEY=$2; shift; shift | ||
echo "ssh -i $SSH_KEY \$@" > /tmp/.git_ssh.$$ | ||
chmod +x /tmp/.git_ssh.$$ | ||
export GIT_SSH=/tmp/.git_ssh.$$ | ||
fi | ||
|
||
# in case the git command is repeated | ||
[ "$1" = "git" ] && shift | ||
|
||
# Run the git command | ||
git "$@" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
system("./git.sh -i .git_utility/key.key git pull origin master"); | ||
?> |