diff --git a/Makefile b/Makefile index a59d8cf..42e69c2 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,7 @@ install-programs: @$(INSTALL_SCRIPT) autodist $(DESTDIR)$(bindir)/autodist @$(INSTALL_SCRIPT) autodist-tool $(DESTDIR)$(bindir)/autodist-tool @$(INSTALL_SCRIPT) autoport $(DESTDIR)$(bindir)/autoport + @$(INSTALL_SCRIPT) automaint $(DESTDIR)$(sbindir)/automaint @$(INSTALL_SCRIPT) autoport-chroot $(DESTDIR)$(sbindir)/autoport-chroot @$(INSTALL_SCRIPT) autodist-upstream-updates $(DESTDIR)$(sbindir)/autodist-upstream-updates @$(INSTALL_SCRIPT) autoport-fix-environment $(DESTDIR)$(bindir)/autoport-fix-environment diff --git a/automaint b/automaint new file mode 100755 index 0000000..98c309c --- /dev/null +++ b/automaint @@ -0,0 +1,211 @@ +#!/bin/bash +# automaint -- batch automatic maintainance tool of the autodist suite +# Copyright (C) 2013 by Silvan Calarco +# +# Released under the terms of the GNU GPL release 3 license +# +VERSION=0.9.7 +# First in vector is base arch +ARCHS=(i586 arm x86_64) + +. /etc/autodist/config + +me=(${0##*/} $VERSION "Sat Mar 20 2011") + +function usage() { + echo "\ +${me[0]} ${me[1]} +"$"Copyright (C) 2013 Silvan Calarco "" +"$"Released under the terms of the GNU GPL v3 license" + echo " +"$"Batch automatic maintainance tool of the autodist suite."" + +"$"Usage"": + $me [-s repository -d repository ] [-p repository] [-h] + + -s repository "$"Automatic/Staging builds source repository + -d repository "$"Main destination repository + -p repository "$"Port repository + -h "$"Show this help and exit +" + +} + +# for webbuild message +function cgi_encodevar() { + local string="${1}" + local strlen=${#string} + local encoded="" + + for (( pos=0 ; pos $pkg_version-$pkg_release)" + openmamba-repository import $SOURCE_REPOSITORY $p -d $PORT_REPOSITORY -y >/dev/null + if [ $? -eq 0 -a "$WEBBUILD_URL" -a "$WEBBUILD_USER" ]; then + curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&SECRET=${WEBBUILD_SECRET}&USER_EMAIL=$WEBBUILD_EMAIL&\ +MESSAGE=`cgi_encodevar \"imported $p from $SOURCE_REPOSITORY to $PORT_REPOSITORY for porting\"`" >/dev/null + fi + else + echo "$p: importing from $SOURCE_REPOSITORY to $DEST_REPOSITORY ($spkg_version-$spkg_release -> $pkg_version-$pkg_release; update type: $update_type)" + openmamba-repository import $SOURCE_REPOSITORY $p -d $DEST_REPOSITORY -y >/dev/null + if [ $? -eq 0 -a "$WEBBUILD_URL" -a "$WEBBUILD_USER" ]; then + curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&SECRET=${WEBBUILD_SECRET}&USER_EMAIL=$WEBBUILD_EMAIL&\ +MESSAGE=`cgi_encodevar \"imported $p from $SOURCE_REPOSITORY to $DEST_REPOSITORY\"`" >/dev/null + fi + fi +done + +exit 0