diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-04-19 18:17:39 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2011-04-19 18:17:39 +0200 |
commit | 04be8c04115698a9b0f609ecd21026d33ded76bd (patch) | |
tree | 9d3626e33af4260034ddf8d913c3973d8fb9d834 | |
download | buildscripts-04be8c04115698a9b0f609ecd21026d33ded76bd.tar.gz buildscripts-04be8c04115698a9b0f609ecd21026d33ded76bd.tar.bz2 buildscripts-04be8c04115698a9b0f609ecd21026d33ded76bd.zip |
starting a build script toolbox
-rw-r--r-- | build-package-for-reprepro.sh | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/build-package-for-reprepro.sh b/build-package-for-reprepro.sh new file mode 100644 index 0000000..8ee97be --- /dev/null +++ b/build-package-for-reprepro.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +# Copyright (C) 2010 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +# +# This programme is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This programme is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +PACKAGE=$(basename `pwd`) + +$PKGDIST="$(pwd)/../pkg-dist/$PACKAGE" +mkdir $PKGDIST + +rm -f $PKGDIST/$PACKAGE_*.changes +rm -f $PKGDIST/$PACKAGE_*.upload +rm -f $PKGDIST/$PACKAGE_*.build +rm -f $PKGDIST/$PACKAGE_*.dsc +rm -f $PKGDIST/$PACKAGE_*.tar.gz +rm -f $PKGDIST/$PACKAGE*.deb + +TEMP_DIR="$(mktemp -d)" +git clone git://code.x2go.org/$PACKAGE.git $TEMP_DIR/ +cd $TEMP_DIR/$PACKAGE + +BUILDS_FOR=""" +debian: sid wheezy squeeze +ubuntu: lucid maverick natty +""" + +for DIST_LIST in $BUILDS_FOR; do + l_DIST=$(echo $DIST_LIST | cut -d":" -f1) + CODENAMES=$(echo $DIST_LIST | cut -d":" -f2-) + for l_CODENAME in $CODENAMES; do + DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 pdebuild --buildresults $PKGDIST/$l_DIST/$l_CODENAME + DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 pdebuild --buildresults $PKGDIST/$l_DIST/$l_CODENAME + done +done +cd - + +cd $PKGDIST +for DIST_LIST in $BUILDS_FOR; do + l_DIST=$(echo $DIST_LIST | cut -d":" -f1) + CODENAMES=$(echo $DIST_LIST | cut -d":" -f2-) + for l_CODENAME in $CODENAMES; do + cd $PKGDIST/$l_DIST/$l_CODENAME + dupload --to x2go-$l_DIST-$l_CODENAME $PACKAGE_*.dsc + dupload --to x2go-$l_DIST-$l_CODENAME $PACKAGE_*.changes + cd - + done +done +cd - + +#rm -Rf $TEMP_DIR |