2017-08-29 17:17:25 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
codename=$1
|
|
|
|
distribution=$2
|
|
|
|
changes_file=$3
|
|
|
|
|
2017-08-30 05:51:28 +02:00
|
|
|
source /home/vinaigrette/config/config
|
2017-08-31 00:35:22 +02:00
|
|
|
source /home/vinaigrette/scripts/package_helpers.sh
|
2017-08-29 17:17:25 +02:00
|
|
|
|
2020-02-07 23:24:00 +01:00
|
|
|
# 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
|
|
|
|
|
2020-06-04 21:35:28 +02:00
|
|
|
reprepro -C $distribution -V -b $REPO_DIR include $codename $changes_file
|
2017-08-29 17:17:25 +02:00
|
|
|
RET=$?
|
|
|
|
|
|
|
|
# Cleaning files
|
|
|
|
if [ $RET -eq 0 ]; then
|
|
|
|
dir=$(cd `dirname $changes_file` && pwd)
|
|
|
|
for f in $(get_files ${changes_file}); do
|
2020-06-04 21:35:28 +02:00
|
|
|
! [[ $f =~ \.orig\.tar\.(gz|xz)$ ]] && rm -f ${dir}/$f
|
2017-08-29 17:17:25 +02:00
|
|
|
done
|
2020-06-04 21:35:28 +02:00
|
|
|
rm -f $changes_file
|
2017-08-29 17:17:25 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit $RET
|