From c815d4c537cb118a4d8067a9243d13af62f8d12b Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 12 May 2011 23:09:40 +0200 Subject: work on build scripts (packaging vs uploading) --- bin/x2go-build+upload-all-packages | 1 + bin/x2go-build+upload-package | 1 + bin/x2go-build-all-packages | 82 ++++++++++++++++ bin/x2go-build-package | 196 +++++++++++++++++++++++++++++++++++++ bin/x2go-buildallpackages | 70 ------------- bin/x2go-buildpackage | 195 ------------------------------------ bin/x2go-upload-all-packages | 1 + bin/x2go-upload-package | 1 + bin/x2go-uploadpackage | 1 - 9 files changed, 282 insertions(+), 266 deletions(-) create mode 120000 bin/x2go-build+upload-all-packages create mode 120000 bin/x2go-build+upload-package create mode 100755 bin/x2go-build-all-packages create mode 100755 bin/x2go-build-package delete mode 100755 bin/x2go-buildallpackages delete mode 100755 bin/x2go-buildpackage create mode 120000 bin/x2go-upload-all-packages create mode 120000 bin/x2go-upload-package delete mode 120000 bin/x2go-uploadpackage diff --git a/bin/x2go-build+upload-all-packages b/bin/x2go-build+upload-all-packages new file mode 120000 index 0000000..b77cc44 --- /dev/null +++ b/bin/x2go-build+upload-all-packages @@ -0,0 +1 @@ +x2go-build-all-packages \ No newline at end of file diff --git a/bin/x2go-build+upload-package b/bin/x2go-build+upload-package new file mode 120000 index 0000000..b6ef03d --- /dev/null +++ b/bin/x2go-build+upload-package @@ -0,0 +1 @@ +x2go-build-package \ No newline at end of file diff --git a/bin/x2go-build-all-packages b/bin/x2go-build-all-packages new file mode 100755 index 0000000..815b7de --- /dev/null +++ b/bin/x2go-build-all-packages @@ -0,0 +1,82 @@ +#!/bin/bash + +# Copyright (C) 2011 by Mike Gabriel +# +# Python X2go 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. +# +# Python X2go 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. + +LIB_PACKAGES_HEULER=" +nxcomp heuler master\n +nxcompext heuler master\n +nxcompshad heuler master\n +python-x2go heuler master\n +" +LIB_PACKAGES_MAIN=" +nxcomp main build-main\n +nxcompext main build-main\n +nxcompshad main build-main\n +python-x2go main build-main\n +" + +APP_PACKAGES_HEULER=" +x2goserver heuler master\n +x2goagent heuler master\n +x2goclient heuler master\n +nxproxy heuler master\n +cups-x2go heuler master\n +x2godesktopsharing heuler master\n +x2gognomebindings heuler master\n +pyhoca-gui heuler master\n +x2gothinclient heuler tmpfs +" +APP_PACKAGES_MAIN=" +x2goserver main build-main\n +x2goagent main build-main\n +x2goclient main build-main\n +nxproxy main build-main\n +cups-x2go main build-main\n +x2godesktopsharing main build-main\n +x2gognomebindings main build-main\n +pyhoca-gui main build-main\n +x2gothinclient heuler tmpfs +" + +COMPONENT=${1:-""} + +# build the newest code... (nightly-builds) +[ "x$COMPONENT" = "xheuler" ] || [ -z $COMPONENT ] && { + echo -e $LIB_PACKAGES_HEULER + $APP_PACKAGES_HEULER | while read pkg comp checkout; do + if [ "x$(basename $0)" = "xx2go-build-all-packages" ]; then + x2go-build-package $pkg $comp $checkout + elif [ "x$(basename $0)" = "xx2go-upload-all-packages" ]; then + x2go-upload-package $pkg $comp $checkout + elif [ "x$(basename $0)" = "xx2go-build+upload-all-packages" ]; then + x2go-build-package $pkg $comp $checkout && x2go-upload-package $pkg $comp $checkout + fi + done +} + +# build all packages tagged as ,,build-main'Ä +[ "x$COMPONENT" = "xmain" ] || [ -z $COMPONENT ] && { + echo -e $LIB_PACKAGES_MAIN + $APP_PACKAGES_MAIN | while read pkg comp checkout; do + if [ "x$(basename $0)" = "xx2go-build-all-packages" ]; then + x2go-build-package $pkg $comp $checkout + elif [ "x$(basename $0)" = "xx2go-upload-all-packages" ]; then + x2go-upload-package $pkg $comp $checkout + elif [ "x$(basename $0)" = "xx2go-build+upload-all-packages" ]; then + x2go-build-package $pkg $comp $checkout && x2go-upload-package $pkg $comp $checkout + fi + done +} diff --git a/bin/x2go-build-package b/bin/x2go-build-package new file mode 100755 index 0000000..8883a2e --- /dev/null +++ b/bin/x2go-build-package @@ -0,0 +1,196 @@ +#!/bin/bash + +# Copyright (C) 2011 by Mike Gabriel +# +# 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. + +test -z $1 && { echo "usage: {main,main/,heuler,heuler/} []"; exit -1; } + +set -ex + +set_vars() { + USE_SUDO="yes" + PDEBUILD="pdebuild --pbuilder qemubuilder" + TEMP_BASE="$HOME/tmp/" + + # first argv is the name of the Git project + PROJECT=$1 + + # grab repository component area from command line (2nd argv) or guess it + ARGV2_COMPONENT=$(echo "$2/" | cut -d"/" -f1) + ARGV2_CODENAME=$(echo "$2/" | cut -d"/" -f2) + COMPONENT=${ARGV2_COMPONENT:-${COMPONENT:-heuler}} + CODENAMES=${ARGV2_CODENAME:-${CODENAMES}} + if [ "x$COMPONENT" = "xmain" ]; then + CHECKOUT=${3:-build-main} + elif [ "x$COMPONENT" = "xheuler" ]; then + CHECKOUT=${3:-master} + DATE="~${DATE:-$(date +%Y%m%d)}" + else + echo "error: no such package component area for X2go packages. Aborting..." + exit -1 + fi + # the DATE might be given as ,,today'' from the command line + [ "x$DATE" = "xtoday" ] && DATE="~$(date +%Y%m%d)" + + # setting paths + PROJECT_DIR=$HOME/build/$COMPONENT/$PROJECT + DIST_SUPPORTED="debian ubuntu" + PKGDIST="$HOME/pkg-dist/$COMPONENT/$PROJECT" + + # creating paths + mkdir -p "$TEMP_BASE" + mkdir -p $PROJECT_DIR + mkdir -p $PKGDIST + + return 0 +} + +clear_pkgdist() { + + # pkgdist directory cleanup + cat BUILDS_FOR | egrep -v '(^$|^#.*$)' | while read line; do + l_DIST=$(echo $line | cut -d":" -f1 | tr [A-Z] [a-z]) + CODENAMES=$(echo $line | cut -d":" -f2- | tr [A-Z] [a#-z]) + echo "$DIST_SUPPORTED" | grep $l_DIST >/dev/null && { + for l_CODENAME in $CODENAMES; do + for l_ARCH in amd64 i386; do + mkdir -p $PKGDIST/$l_DIST/$l_CODENAME + rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.changes + rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.upload + rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.build + rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.dsc + rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.tar.gz + rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/*.deb + done + done + } + done + return 0 +} + +prepare_workspace() { + # in any case remove the BUILDS_FOR file + rm -f $PROJECT_DIR/BUILDS_FOR + + # make sure our local working copy is up to date... + if [ -d $PROJECT_DIR/.git ]; then + cd $PROJECT_DIR && git reset --hard + git pull origin $CHECKOUT + git checkout $CHECKOUT || git checkout -b $CHECKOUT + else + cd $(dirname $PROJECT_DIR) + git clone git://code.x2go.org/$PROJECT.git + cd $PROJECT + git checkout $CHECKOUT || git checkout -b $CHECKOUT; + fi + cd $PROJECT_DIR + + # by default we build for all current debian versions + test -f BUILDS_FOR || cat > BUILDS_FOR </dev/null && { + for l_CODENAME in $CODENAMES; do + TEMP_DIR="$(mktemp -d --tmpdir=$TEMP_BASE)" + mkdir -p $TEMP_DIR/$PROJECT + git clone --local $PROJECT_DIR $TEMP_DIR/$PROJECT/ + cd $TEMP_DIR/$PROJECT + git checkout $CHECKOUT || git checkout master + GITREV=$(x2go-gitrevno) + # translate the version name for Debian releases + [ "x$l_CODENAME" = "xsid" ] && VERSION=unstable + [ "x$l_CODENAME" = "xwheezy" ] && VERSION=testing + [ "x$l_CODENAME" = "xsqueeze" ] && VERSION=stable + [ "x$l_CODENAME" = "xlenny" ] && VERSION=oldstable + + # modify the section for non-main package builds + [ "x$COMPONENT" = "xmain" ] || { + mv debian/control debian/control.tmp + cat debian/control.tmp | sed "s#Section:[\ ]*\(.*\)#Section: $COMPONENT/\1#g" > debian/control + } + + # modify changelog for this build + DEBEMAIL=git-admin@x2go.org DEBFULLNAME="X2go Git Administrator" dch --distribution $VERSION --force-distribution -l "+$l_CODENAME~$COMPONENT$DATE~$GITREV~build" "Auto-built $l_DIST $l_CODENAME package for packages.x2go.org repository." + mkdir -p $PKGDIST/$l_DIST/$l_CODENAME/{amd64,i386} + OTHERMIRROR="deb http://packages.x2go.org/debian $l_CODENAME $COMPONENT" + [ "x$USE_SUDO" != "xyes" ] && { + cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && { + DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME/amd64 + } + cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && { + DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME/i386 -- --binary-arch + } + } + [ "x$USE_SUDO" = "xyes" ] && { + cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && { + sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME/amd64 + } + cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && { + sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME/i386 -- --binary-arch + } + } + cd - + rm -Rf $TEMP_DIR + done + echo + } + echo + done + return 0 +} + +upload_packages() { + # dupload the new packages to the reprepro repository + cd $PKGDIST + cat $PROJECT_DIR/BUILDS_FOR | egrep -v '(^$|^#.*$)' | while read line; do + l_DIST=$(echo $line | cut -d":" -f1 | tr [A-Z] [a-z]) + CODENAMES=${CODENAMES:-$(echo $line | cut -d":" -f2- | tr [A-Z] [a#-z])} + for l_CODENAME in $CODENAMES; do + for l_ARCH in amd64 i386; do + cd $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH + ls $PROJECT_*.changes &>/dev/null && dupload --to x2go-$l_DIST-$l_CODENAME $PROJECT_*.changes + cd - + done + done + done + cd - + return 0 +} + +### MAIN ### +set_vars $@ && { + if [ "x$(basename $0)" = "xx2go-build-package" ]; then + cd $PROJECT_DIR && x2go-pkgneedsbuild $CHECKOUT && { + clear_pkgdist + prepare_workspace && { + build_packages + } + } + fi + if [ "x$(basename $0)" = "xx2go-upload-package" ] || [ "x$(basename $0)" = "xx2go-build+upload-package" ]; then + upload_packages + fi +} diff --git a/bin/x2go-buildallpackages b/bin/x2go-buildallpackages deleted file mode 100755 index cb877bf..0000000 --- a/bin/x2go-buildallpackages +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2011 by Mike Gabriel -# -# Python X2go 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. -# -# Python X2go 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. - -LIB_PACKAGES_HEULER=" -nxcomp heuler master\n -nxcompext heuler master\n -nxcompshad heuler master\n -python-x2go heuler master\n -" -LIB_PACKAGES_MAIN=" -nxcomp main build-main\n -nxcompext main build-main\n -nxcompshad main build-main\n -python-x2go main build-main\n -" - -APP_PACKAGES_HEULER=" -x2goserver heuler master\n -x2goagent heuler master\n -x2goclient heuler master\n -nxproxy heuler master\n -cups-x2go heuler master\n -x2godesktopsharing heuler master\n -x2gognomebindings heuler master\n -pyhoca-gui heuler master\n -x2gothinclient heuler tmpfs -" -APP_PACKAGES_MAIN=" -x2goserver main build-main\n -x2goagent main build-main\n -x2goclient main build-main\n -nxproxy main build-main\n -cups-x2go main build-main\n -x2godesktopsharing main build-main\n -x2gognomebindings main build-main\n -pyhoca-gui main build-main\n -x2gothinclient heuler tmpfs -" - -COMPONENT=${1:-""} - -# build the newest code... (nightly-builds) -[ "x$COMPONENT" = "xheuler" ] || [ -z $COMPONENT ] && { - echo -e $LIB_PACKAGES_HEULER + $APP_PACKAGES_HEULER | while read pkg comp checkout; do - x2go-buildpackage $pkg $comp $checkout && x2go-packageupload $pkg $comp $checkout - done -} - -# build all packages tagged as ,,build-main'Ä -[ "x$COMPONENT" = "xmain" ] || [ -z $COMPONENT ] && { - echo -e $LIB_PACKAGES_MAIN + $APP_PACKAGES_MAIN | while read pkg comp checkout; do - x2go-buildpackage $pkg $comp $checkout && x2go-packageupload $pkg $comp $checkout - done -} diff --git a/bin/x2go-buildpackage b/bin/x2go-buildpackage deleted file mode 100755 index 23cf0e8..0000000 --- a/bin/x2go-buildpackage +++ /dev/null @@ -1,195 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2011 by Mike Gabriel -# -# 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. - -test -z $1 && { echo "usage: {main,main/,heuler,heuler/} []"; exit -1; } - -set -ex - -set_vars() { - USE_SUDO="yes" - PDEBUILD="pdebuild --pbuilder qemubuilder" - TEMP_BASE="$HOME/tmp/" - - # first argv is the name of the Git project - PROJECT=$1 - - # grab repository component area from command line (2nd argv) or guess it - ARGV2_COMPONENT=$(echo "$2/" | cut -d"/" -f1) - ARGV2_CODENAME=$(echo "$2/" | cut -d"/" -f2) - COMPONENT=${ARGV2_COMPONENT:-${COMPONENT:-heuler}} - CODENAMES=${ARGV2_CODENAME:-${CODENAMES}} - if [ "x$COMPONENT" = "xmain" ]; then - CHECKOUT=${3:-build-main} - elif [ "x$COMPONENT" = "xheuler" ]; then - CHECKOUT=${3:-master} - DATE="~${DATE:-$(date +%Y%m%d)}" - else - echo "error: no such package component area for X2go packages. Aborting..." - exit -1 - fi - # the DATE might be given as ,,today'' from the command line - [ "x$DATE" = "xtoday" ] && DATE="~$(date +%Y%m%d)" - - # setting paths - PROJECT_DIR=$HOME/build/$COMPONENT/$PROJECT - DIST_SUPPORTED="debian ubuntu" - PKGDIST="$HOME/pkg-dist/$COMPONENT/$PROJECT" - - # creating paths - mkdir -p "$TEMP_BASE" - mkdir -p $PROJECT_DIR - mkdir -p $PKGDIST - - return 0 -} - -clear_pkgdist() { - - # pkgdist directory cleanup - cat BUILDS_FOR | egrep -v '(^$|^#.*$)' | while read line; do - l_DIST=$(echo $line | cut -d":" -f1 | tr [A-Z] [a-z]) - CODENAMES=$(echo $line | cut -d":" -f2- | tr [A-Z] [a#-z]) - echo "$DIST_SUPPORTED" | grep $l_DIST >/dev/null && { - for l_CODENAME in $CODENAMES; do - for l_ARCH in amd64 i386; do - mkdir -p $PKGDIST/$l_DIST/$l_CODENAME - rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.changes - rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.upload - rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.build - rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.dsc - rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.tar.gz - rm -f $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/*.deb - done - done - } - done - return 0 -} - -prepare_workspace() { - # in any case remove the BUILDS_FOR file - rm -f $PROJECT_DIR/BUILDS_FOR - - # make sure our local working copy is up to date... - if [ -d $PROJECT_DIR/.git ]; then - cd $PROJECT_DIR && git reset --hard - git pull origin $CHECKOUT - git checkout $CHECKOUT || git checkout -b $CHECKOUT - else - cd $(dirname $PROJECT_DIR) - git clone git://code.x2go.org/$PROJECT.git - cd $PROJECT - git checkout $CHECKOUT || git checkout -b $CHECKOUT; - fi - cd $PROJECT_DIR - - # by default we build for all current debian versions - test -f BUILDS_FOR || cat > BUILDS_FOR </dev/null && { - for l_CODENAME in $CODENAMES; do - TEMP_DIR="$(mktemp -d --tmpdir=$TEMP_BASE)" - mkdir -p $TEMP_DIR/$PROJECT - git clone --local $PROJECT_DIR $TEMP_DIR/$PROJECT/ - cd $TEMP_DIR/$PROJECT - git checkout $CHECKOUT || git checkout master - GITREV=$(x2go-gitrevno) - # translate the version name for Debian releases - [ "x$l_CODENAME" = "xsid" ] && VERSION=unstable - [ "x$l_CODENAME" = "xwheezy" ] && VERSION=testing - [ "x$l_CODENAME" = "xsqueeze" ] && VERSION=stable - [ "x$l_CODENAME" = "xlenny" ] && VERSION=oldstable - - # modify the section for non-main package builds - [ "x$COMPONENT" = "xmain" ] || { - mv debian/control debian/control.tmp - cat debian/control.tmp | sed "s#Section:[\ ]*\(.*\)#Section: $COMPONENT/\1#g" > debian/control - } - - # modify changelog for this build - DEBEMAIL=git-admin@x2go.org DEBFULLNAME="X2go Git Administrator" dch --distribution $VERSION --force-distribution -l "+$l_CODENAME~$COMPONENT$DATE~$GITREV~build" "Auto-built $l_DIST $l_CODENAME package for packages.x2go.org repository." - mkdir -p $PKGDIST/$l_DIST/$l_CODENAME/{amd64,i386} - OTHERMIRROR="deb http://packages.x2go.org/debian $l_CODENAME $COMPONENT" - [ "x$USE_SUDO" != "xyes" ] && { - cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && { - DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME/amd64 - } - cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && { - DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME/i386 -- --binary-arch - } - } - [ "x$USE_SUDO" = "xyes" ] && { - cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && { - sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME/amd64 - } - cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && { - sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME/i386 -- --binary-arch - } - } - cd - - rm -Rf $TEMP_DIR - done - echo - } - echo - done - return 0 -} - -upload_packages() { - # dupload the new packages to the reprepro repository - cd $PKGDIST - cat $PROJECT_DIR/BUILDS_FOR | egrep -v '(^$|^#.*$)' | while read line; do - l_DIST=$(echo $line | cut -d":" -f1 | tr [A-Z] [a-z]) - CODENAMES=${CODENAMES:-$(echo $line | cut -d":" -f2- | tr [A-Z] [a#-z])} - for l_CODENAME in $CODENAMES; do - for l_ARCH in amd64 i386; do - cd $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH - ls $PROJECT_*.changes &>/dev/null && dupload --to x2go-$l_DIST-$l_CODENAME $PROJECT_*.changes - cd - - done - done - done - cd - - return 0 -} - -### MAIN ### -set_vars $@ && { - if ["x$(basename $0)" = "xx2go-buildpackage" ]; then - cd $PROJECT_DIR && x2go-pkgneedsbuild $CHECKOUT && { - clear_pkgdist - prepare_workspace && { - build_packages - } - } - elif ["x$(basename $0)" = "xx2go-uploadpackage" ]; then - upload_packages - fi -} diff --git a/bin/x2go-upload-all-packages b/bin/x2go-upload-all-packages new file mode 120000 index 0000000..b77cc44 --- /dev/null +++ b/bin/x2go-upload-all-packages @@ -0,0 +1 @@ +x2go-build-all-packages \ No newline at end of file diff --git a/bin/x2go-upload-package b/bin/x2go-upload-package new file mode 120000 index 0000000..b6ef03d --- /dev/null +++ b/bin/x2go-upload-package @@ -0,0 +1 @@ +x2go-build-package \ No newline at end of file diff --git a/bin/x2go-uploadpackage b/bin/x2go-uploadpackage deleted file mode 120000 index 18eb486..0000000 --- a/bin/x2go-uploadpackage +++ /dev/null @@ -1 +0,0 @@ -x2go-buildpackage \ No newline at end of file -- cgit v1.2.3