#!/bin/bash action=$1 codename=$2 package=$3 version=$4 changes_file=$5 source /home/vinaigrette/config/config source /home/vinaigrette/scripts/package_helpers.sh # Only care about packages being added if [[ $action != accepted ]]; then exit 1 fi # Only care about source packages arch=$(get_architecture $changes_file) if [[ $arch != source ]]; then exit 0 fi # Retrieve the .dsc file dsc_file=$(dirname ${changes_file})/${package}_${version}.dsc if [ ! -f $dsc_file ]; then echo "Unable to find the .dsc file" exit 1 fi # Retrieve architecture from the .dsc arch=$(awk '/^Architecture: / {print $2}' ${dsc_file}) if [[ $arch =~ -?any ]]; then source /etc/default/rebuildd # Add all architectures supported by rebuildd arch=$ARCHS fi # Kick off the job for a in $arch; do /home/vinaigrette/scripts/rebuildd-job add $package $version $codename $a done exit 0