2020-01-16 14:09:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2020-01-16 16:28:42 +00:00
|
|
|
srcDir=.
|
2020-01-16 14:09:47 +00:00
|
|
|
|
|
|
|
if [ ! -f "$srcDir/debian/changelog" ]; then
|
|
|
|
echo "Invalid source directory."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-01-16 16:28:42 +00:00
|
|
|
codename=$1
|
2020-01-16 14:09:47 +00:00
|
|
|
buildDir="$srcDir/.."
|
|
|
|
|
|
|
|
if [ -z "$codename" ]; then
|
|
|
|
codename="stable"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cut -d" " -f1 "$srcDir/debian/files" |
|
|
|
|
while read debFile; do
|
|
|
|
if [[ ! "$debFile" =~ .*\.deb$ ]]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Adding $debFile"
|
2020-01-16 16:28:42 +00:00
|
|
|
cp "$buildDir/$debFile" /tmp
|
2020-01-16 16:55:53 +00:00
|
|
|
sudo -u www-data reprepro -b /reprepro --gnupghome /reprepro/.gnupg \
|
2020-01-16 16:35:34 +00:00
|
|
|
includedeb $codename "/tmp/$debFile"
|
2020-01-16 14:09:47 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
echo "Cleaning."
|
|
|
|
(cd "$srcDir" && debian/rules clean)
|
|
|
|
rm -f $buildDir/*.deb
|
|
|
|
rm -f $buildDir/*.changes
|
|
|
|
rm -f $buildDir/*.build
|
2020-01-16 14:12:54 +00:00
|
|
|
rm -f $buildDir/*.buildinfo
|