33 lines
577 B
Plaintext
33 lines
577 B
Plaintext
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
srcDir=$1
|
||
|
|
||
|
if [ ! -f "$srcDir/debian/changelog" ]; then
|
||
|
echo "Invalid source directory."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
codename=$2
|
||
|
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"
|
||
|
reprepro -b "/reprepro" includedeb $codename "$buildDir/$debFile"
|
||
|
done
|
||
|
|
||
|
echo "Cleaning."
|
||
|
(cd "$srcDir" && debian/rules clean)
|
||
|
rm -f $buildDir/*.deb
|
||
|
rm -f $buildDir/*.changes
|
||
|
rm -f $buildDir/*.build
|