summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2010-05-18 04:05:20 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2010-05-18 04:05:20 -0400
commit5c1ddddc01b7a80c112bb07b8d674ea0c3dc4cc8 (patch)
tree0508005d1f4faa8a0269afc9c9bb90d3fc087ee0
parentTypo. (diff)
downloadGitTools-5c1ddddc01b7a80c112bb07b8d674ea0c3dc4cc8.tar.xz
GitTools-5c1ddddc01b7a80c112bb07b8d674ea0c3dc4cc8.zip
Update git tools for labs repository.
-rwxr-xr-xNewProject.sh35
-rw-r--r--README.txt7
2 files changed, 31 insertions, 11 deletions
diff --git a/NewProject.sh b/NewProject.sh
index 0469d50..a8ab21d 100755
--- a/NewProject.sh
+++ b/NewProject.sh
@@ -1,7 +1,34 @@
#!/bin/sh
+currentDir=`pwd`
+targetDir="`basename \"$currentDir\"`"
+OPTIONS="-o ControlMaster=auto -o ControlPath=./.uploadcontrolpath"
+echo '#!/bin/sh' > ./.gitsshupload
+echo -n 'exec ssh ' >> ./.gitsshupload
+echo -n "$OPTIONS " >> ./.gitsshupload
+echo '"$@"' >> ./.gitsshupload
+chmod +x ./.gitsshupload
+export GIT_SSH="./.gitsshupload"
+ssh $OPTIONS -fN git@labs.anyclip.com
+controlinstance="$!"
+echo $controlinstance
-git symbolic-ref HEAD "refs/heads/$1"
-rm .git/index
-git clean -fdxq
+ssh $OPTIONS git@labs.anyclip.com "\
+cd ~;\
+mkdir \"$targetDir\";\
+cd \"$targetDir\";
+git init --bare;\
+echo \"$1\" > description;\
+mv hooks/post-update.sample hooks/post-update;\
+chmod +x hooks/post-update;"
+echo "[remote \"origin\"]
+ url = labs.anyclip.com:$targetDir
+ fetch = +refs/heads/*:refs/remotes/origin/*
+[branch \"master\"]
+ remote = origin
+ merge = refs/heads/master" >> .git/config
+git push --all
+ssh $OPTIONS git@labs.anyclip.com "~/updatewebinterface.sh"
-echo "Switched to new branch \"$1\". Make an initial commit."
+fuser -ks ./.uploadcontrolpath
+rm ./.uploadcontrolpath
+rm ./.gitsshupload \ No newline at end of file
diff --git a/README.txt b/README.txt
deleted file mode 100644
index e797e98..0000000
--- a/README.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Welcome to the AnyClip Labs git repository. Each labs project is a seperate "branch".
-
-To create a new branch for a new project, run
-
-./NewProject.sh MyNewProject
-
-and then make your first commit. It's customary not to use spaces in the branch name.