-
Notifications
You must be signed in to change notification settings - Fork 3
/
reprepro.sh
executable file
·25 lines (22 loc) · 1.93 KB
/
reprepro.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Copyright (C) 2014, Apertium Project Management Committee <[email protected]>
# Licensed under the GNU GPL version 2 or later; see https://www.gnu.org/licenses/
rm -f /home/apertium/public_html/apt/logs/$1/reprepro.log
for DISTRO in sid bullseye bookworm bionic focal jammy noble oracular
do
echo "reprepro $DISTRO" >> /home/apertium/public_html/apt/logs/$1/reprepro.log
DISTRO_TRG=$DISTRO
if [[ -n "$2" && "$3" == *",$DISTRO,"* ]]; then
DISTRO=sid
echo "True data-only, using $DISTRO pkg for $DISTRO_TRG" >> /home/apertium/public_html/apt/logs/$1/reprepro.log
fi
find $AUTOPKG_AUTOPATH -type f -name '*.deb' | grep "~$DISTRO" | xargs -rn1 reprepro -b /home/apertium/public_html/apt/$AUTOPKG_BUILDTYPE/ includedeb $DISTRO_TRG 2>&1 | tee -a /home/apertium/public_html/apt/logs/$1/reprepro.log
# find $AUTOPKG_AUTOPATH -type f -name '*.changes' | grep -v _source.changes | grep "~$DISTRO" | xargs -rn1 reprepro -b /home/apertium/public_html/apt/$AUTOPKG_BUILDTYPE/ include $DISTRO_TRG 2>&1 | tee -a /home/apertium/public_html/apt/logs/$1/reprepro.log
# find $AUTOPKG_AUTOPATH -type f -name '*.changes' | grep -v _source.changes | grep "~$DISTRO" | xargs -rn1 docker run --rm --network none -v /home/apertium/public_html/apt/$AUTOPKG_BUILDTYPE/:/build/ -v /root/.gnupg/:/root/.gnupg/ reprepro reprepro -b /build/ include $DISTRO_TRG" 2>&1 | tee -a /home/apertium/public_html/apt/logs/$1/reprepro.log
done
rm -rf /home/apertium/public_html/apt/$AUTOPKG_BUILDTYPE/source/$1
mkdir -pv /home/apertium/public_html/apt/$AUTOPKG_BUILDTYPE/source/$1/
cp -av --reflink=auto $AUTOPKG_AUTOPATH/*.dsc /home/apertium/public_html/apt/$AUTOPKG_BUILDTYPE/source/$1/
cp -av --reflink=auto $AUTOPKG_AUTOPATH/*.changes /home/apertium/public_html/apt/$AUTOPKG_BUILDTYPE/source/$1/
cp -av --reflink=auto $AUTOPKG_AUTOPATH/*.tar.bz2 /home/apertium/public_html/apt/$AUTOPKG_BUILDTYPE/source/$1/
chown -R apertium:apertium /home/apertium/public_html/apt/$AUTOPKG_BUILDTYPE