summaryrefslogtreecommitdiff
path: root/bin/gitcreate
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2011-12-21 01:21:48 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2011-12-21 01:21:48 +0100
commiteb97641594b08b0d29dcaa486824a73fc4b823bf (patch)
tree6e1957a65dc1903afd721b09f3a8d7d857759e18 /bin/gitcreate
parent254c45c7421caaf8987dc5af0c560f3cb24a0bec (diff)
downloadbuildscripts-eb97641594b08b0d29dcaa486824a73fc4b823bf.tar.gz
buildscripts-eb97641594b08b0d29dcaa486824a73fc4b823bf.tar.bz2
buildscripts-eb97641594b08b0d29dcaa486824a73fc4b823bf.zip
replaced buildscripts with those form NWT build site
Diffstat (limited to 'bin/gitcreate')
-rwxr-xr-xbin/gitcreate26
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/gitcreate b/bin/gitcreate
new file mode 100755
index 0000000..3d93faf
--- /dev/null
+++ b/bin/gitcreate
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -xe
+
+GIT_USER=
+GIT_HOSTNAME=
+GIT_SSH_PORT=22
+
+PREFIX=$(echo `basename $0` | cut -d"-" -f1)
+. ~/.buildscripts/$PREFIX.conf
+
+
+for pkg in "$@"; do
+ subdir=$(dirname $pkg)/
+ pkg=$(basename $pkg)
+ ssh -l$GIT_USER $GIT_HOSTNAME "cd ~/git && ./setup-repository ${subdir}${pkg} '$pkg upstream project'"
+ ssh -l$GIT_USER $GIT_HOSTNAME "cd ~/git && ./update-repository-posixacls ${subdir}${pkg}"
+ test -d "$pkg" && cd "$pkg"
+ echo "$pkg: MASTER BRANCH" && git push ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} master
+ git branch | grep upstream &>/dev/null && echo "$pkg: RELEASE BRANCH" && git push ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} upstream
+ git branch | grep pristine-tar &>/dev/null && echo "$pkg: PRISTINE-TAR" && git push ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} pristine-tar
+ echo "$pkg: PUSHING TAGS" && git push --tags ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg}
+ git remote | grep origin >/dev/null || git remote add origin ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg}
+ git remote add ${PREFIX}-public ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg}
+ cd ..
+done