Created
April 16, 2015 09:46
-
-
Save moccos/a7a8c9085b032f55aed9 to your computer and use it in GitHub Desktop.
Initialize a git repository at server.
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 | |
repo_name=$1 | |
if [ $repo_name = "" ]; then | |
echo "Specify repo name." | |
exit -1 | |
fi | |
dir_name=${repo_name}.git | |
mkdir $dir_name | |
cd $dir_name | |
git --bare init --share | |
cd .. | |
chmod -R 777 $dir_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment