Created
June 23, 2015 17:01
-
-
Save zeroows/927f64162261c086a8ef to your computer and use it in GitHub Desktop.
Shell script to automate creating a git repository and initializing it on my Synology NAS
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 characters
#! /bin/sh | |
if [ $# -eq 0 ] ; then | |
echo "Usage: repoName" | |
exit 1 | |
fi | |
# git base folder | |
gitFolder="/volume1/git/" | |
loc=$gitFolder$1 | |
echo "Creating a git repo with name: $loc" | |
mkdir $loc | |
cd $loc | |
git init --bare |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment