From baf582456e485e2e4272c0b888f9ccdb10cde499 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 20 Dec 2011 21:26:26 +0100 Subject: reworked buildscripts completely, so that they can be used for several projects --- bin/gitcreate | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 bin/gitcreate (limited to 'bin/gitcreate') 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 -- cgit v1.2.3 From 62b47aba27c20caf5d4fb2dea10c3ea1a724d3dd Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 21 Dec 2011 00:02:55 +0100 Subject: fixed scripts, configured other build servers --- bin/gitcreate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/gitcreate') diff --git a/bin/gitcreate b/bin/gitcreate index 612173b..159b298 100755 --- a/bin/gitcreate +++ b/bin/gitcreate @@ -6,7 +6,7 @@ GIT_USER= GIT_HOSTNAME= GIT_SSH_PORT=22 -PREFIX=$(echo $0 | cut -d"-" -f1) +PREFIX=$(echo `basename $0` | cut -d"-" -f1) . ~/.buildscripts/$PREFIX.conf -- cgit v1.2.3 From db9cf4ebce4eaa26767ea30dee085021a4aec242 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 21 Dec 2011 00:18:15 +0100 Subject: add a PREFIX-public git-remote site for each public location --- bin/gitcreate | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/gitcreate') diff --git a/bin/gitcreate b/bin/gitcreate index 159b298..3d93faf 100755 --- a/bin/gitcreate +++ b/bin/gitcreate @@ -20,6 +20,7 @@ for pkg in "$@"; do 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} + 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 -- cgit v1.2.3