Created
April 20, 2012 15:26
-
-
Save benhosmer/2429595 to your computer and use it in GitHub Desktop.
A shell script to change permissions of the gitolite repositories to make them readable by GitPHP
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 | |
GITOLITE_REPO_PATH="/home/gitolite/repositories" | |
GITOLITE_ADMIN_PATH="$GITOLITE_REPO_PATH/gitolite-admin.git" | |
debug () | |
{ | |
echo "[D]: $1" > /dev/null | |
} | |
for dir in `find $GITOLITE_REPO_PATH -type -d`; do | |
if [ "$dir" != "GITOLITE_ADMIN_PATH" ]; then | |
`chmod -R 0755 $dir` | |
fi | |
debug "Permissions changed for all repositories." | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to find a solution for this problem too and I stumbled across your script here. I seem to have encountered some issues with it, so I made a few tweaks and thought I would share.