diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-12-20 21:26:26 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-12-20 21:26:26 +0100 |
commit | baf582456e485e2e4272c0b888f9ccdb10cde499 (patch) | |
tree | 029cf372e26399b49e9b922539090528fb403d61 /bin/gitcreate | |
parent | 2533ac9afb98f8e5b236fec73f1b985ab94f8ff6 (diff) | |
download | buildscripts-baf582456e485e2e4272c0b888f9ccdb10cde499.tar.gz buildscripts-baf582456e485e2e4272c0b888f9ccdb10cde499.tar.bz2 buildscripts-baf582456e485e2e4272c0b888f9ccdb10cde499.zip |
reworked buildscripts completely, so that they can be used for several projects
Diffstat (limited to 'bin/gitcreate')
-rwxr-xr-x | bin/gitcreate | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/gitcreate b/bin/gitcreate new file mode 100755 index 0000000..612173b --- /dev/null +++ b/bin/gitcreate @@ -0,0 +1,25 @@ +#!/bin/bash + +set -xe + +GIT_USER= +GIT_HOSTNAME= +GIT_SSH_PORT=22 + +PREFIX=$(echo $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 add origin ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} + cd .. +done |