Files
Reprepro-Wrapper/root/usr/lib/reprepro/import
Cantibra 2be44ab99c
All checks were successful
Reprepro Wrapper / Reprepro Wrapper (Bookworm) [arm64] (push) Successful in 12s
Reprepro Wrapper / Reprepro Wrapper (Bookworm) [amd64] (push) Successful in 10s
Inital Commit
2025-10-26 08:05:51 +01:00

46 lines
1005 B
Bash

#!/usr/bin/bash
###
#
# Options Section
#
###
set -e
set -o pipefail
###
#
# Variable Section
#
###
OUTDIR=$(/usr/bin/grep 'outdir' '/etc/reprepro/options' | /usr/bin/sed --expression='s/outdir //')
###
#
# Runtime Environment
#
###
if [[ ! -d "${OUTDIR}" ]]; then
/usr/bin/install --directory --group='nogroup' --owner='nobody' "${OUTDIR}"
exit 0
fi
for DEBINFO in "${OUTDIR}/import"/*.rep; do
source "${DEBINFO}"
if [[ -f "${OUTDIR}/pool/${COMPONENT}/${DEB:0:1}/${PACKAGE}/${DEB}" ]]; then
for VERSION_CODENAME in ${CODENAME}; do
/usr/bin/reprepro --confdir '/etc/reprepro' --silent --component "${COMPONENT}" remove "${VERSION_CODENAME}" "${PACKAGE}" &> '/dev/null'
done
fi
for VERSION_CODENAME in ${CODENAME}; do
/usr/bin/reprepro --confdir '/etc/reprepro' --silent --component "${COMPONENT}" includedeb "${VERSION_CODENAME}" "${OUTDIR}/import/${DEB}" &> '/dev/null'
done
/usr/bin/rm --force "${OUTDIR}/import/${DEB}"
/usr/bin/rm --force "${DEBINFO}"
done