tools/mkproject.sh
1	#!/bin/bash
2
3 NAME=$1;
4 if [ "$NAME" == "" ]; then
5 echo "Need to pass a project name"
6 exit 1
7 fi
8 TLD=$PWD
9 GIT_HOME="/home/git/"
10 PROJECT_SUFFIX=".git"
11 PROJECT_DIR="$GIT_HOME/$NAME$PROJECT_SUFFIX"
12
13 mkdir $PROJECT_DIR || echo "Couldn't mkdir $PROJECT_DIR"
14 cd $PROJECT_DIR || echo "Couldn't cd to $PROJECT_DIR"
15 $(which git) init --bare || echo "Couldn't init git in $PROJECT_DIR"
16 cd $TLD || echo "Couldnt cd back up to $TLD"