- #!/bin/bash
- NAME=$1;
- if [ "$NAME" == "" ]; then
- echo "Need to pass a project name"
- exit 1
- fi
- TLD=$PWD
- GIT_HOME="/home/git/"
- PROJECT_SUFFIX=".git"
- PROJECT_DIR="$GIT_HOME/$NAME$PROJECT_SUFFIX"
- mkdir $PROJECT_DIR || echo "Couldn't mkdir $PROJECT_DIR"
- cd $PROJECT_DIR || echo "Couldn't cd to $PROJECT_DIR"
- $(which git) init --bare || echo "Couldn't init git in $PROJECT_DIR"
- cd $TLD || echo "Couldnt cd back up to $TLD"
|