#!/bin/bash codename=$1 distribution=$2 changes_file=$3 source /home/vinaigrette/config/config source /home/vinaigrette/scripts/package_helpers.sh # Fucking ugly manual patch because when building packages for buster, the Binary: field is missing... if ! grep -q "Binary:" $changes_file then # We take is from the .dsc file DSC=$(echo $changes_file | sed 's/_source.changes/.dsc/g') echo $(grep "Binary:" $DSC) >> $changes_file fi reprepro -C $distribution -V -b $REPO_DIR include $codename $changes_file RET=$? # Cleaning files if [ $RET -eq 0 ]; then dir=$(cd `dirname $changes_file` && pwd) for f in $(get_files ${changes_file}); do ! [[ $f =~ \.orig\.tar\.(gz|xz)$ ]] && rm -f ${dir}/$f done rm -f $changes_file fi exit $RET