notify-send 'cecse' "creating $proj module, please wait..."
./scripts/new_module $proj
notify-send 'cecse' "adding owens.tech remotes..."
- ssh git@owens.tech "new_module $proj cecse"
+ ssh git@owens.tech "new_git_module $proj cecse"
cd $proj
git remote set-url --add --push origin git@github.com:cecse/$proj.git
git remote set-url --add --push origin git@owens.tech:cecse/$proj.git
--- /dev/null
+#!/bin/bash
+
+usage() {
+ echo "$0 <module name> [project name]"
+}
+
+GIT_HOME="/home/git"
+
+if [[ $# -eq 0 || $# -gt 2 ]]; then
+ usage
+ exit 1
+fi
+
+if [[ "$2" -ne "" ]]; then
+ [[ ! -d "$GIT_HOME/$2" ]] && mkdir -p "$GIT_HOME/$2"
+fi
+
+GIT_HOME="$GIT_HOME/$2"
+
+mkdir "$GIT_HOME/$1.git" "$GIT_HOME/test-$1.git"
+
+cd "$GIT_HOME/$1.git"
+git init --bare
+cat config $GIT_HOME/config > config
+echo "" > description
+
+cd "$GIT_HOME/test-$1.git"
+git init --bare
+cat config $GIT_HOME/config > config
+echo "" > description