diff options
Diffstat (limited to 'bin/x2go-packageupload')
-rwxr-xr-x | bin/x2go-packageupload | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/bin/x2go-packageupload b/bin/x2go-packageupload deleted file mode 100755 index fc6b1ca..0000000 --- a/bin/x2go-packageupload +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2011 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. - -test -z $1 && { echo "usage: <x2go-git-project> {main,main/<codename>,heuler,heuler/<codename>} [<git-checkout>]"; 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:-${CODENAME_ONLY:-sid}} - 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 -} - -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 $@ && upload_packages |