Skip to content

Instantly share code, notes, and snippets.

@zeroows
Created June 23, 2015 17:01
Show Gist options
  • Save zeroows/927f64162261c086a8ef to your computer and use it in GitHub Desktop.
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
#! /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