#!/bin/sh set -e -u MYDIR="$(readlink -f `dirname $0`)" usage() { BN=`basename $0` cat < is the source package name that we take over of. You may list more than one package. EOF exit 0 } TOP='' MAIL='' RFA='' GIT='' LOCAL='' while getopts t:m:a:g:hn o; do case $o in h) usage;; m) MAIL=$OPTARG;; t) TOP=$OPTARG;; a) RFA=$OPTARG;; g) GIT=$OPTARG;; n) LOCAL=1;; esac done shift `expr $OPTIND - 1` if [ -n "$RFA" ] && [ -n "$MAIL" ]; then echo "-m and -a cannot be given at the same time" exit 1 fi if [ -n "$GIT" ] && [ $# -gt 1 ]; then echo '-g option allows only one package name' exit 1; fi [ -n "$TOP" ] || usage TMP=`mktemp -d` trap "rm -rf $TMP" QUIT INT 0 inject_package() { PACKAGE=$1 cat </dev/stderr fi if [ -z "$LOCAL" ]; then git push fi rm -rf $TMP } [ -n "${1:-}" ] || usage PACKAGES='' CURPWD=$(pwd) while [ -n "${1:-}" ]; do inject_package $1 PACKAGES="$PACKAGES $1" shift cd $CURPWD done if [ -n "$LOCAL" ]; then echo "Nothing pushed to alioth" echo "You may want to inspect the resulting repositories for" echo $PACKAGES echo "and run $TOP/alioth-git-repo" echo "to create the alioth repository and push the local" echo "repository there" fi