Skip to content

Commit d3ba8bc

Browse files
committed
Use ici functions in reprepro/stage.sh
1 parent c4fb728 commit d3ba8bc

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

reprepro/stage.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/bash
22

3+
DIR_THIS="$(dirname "${BASH_SOURCE[0]}")"
4+
SRC_PATH="$(realpath "$DIR_THIS/../src")"
5+
6+
# shellcheck source=src/util.sh
7+
source "$SRC_PATH/util.sh"
8+
ici_setup
9+
310
if [ -r ~/.reprepro.env ]; then
411
# shellcheck disable=SC1090
512
. ~/.reprepro.env
@@ -9,23 +16,29 @@ fi
916
[ -z "$DISTRO" ] && DISTRO=(jammy noble)
1017
[ -z "$ARCH" ] && ARCH=(amd64 arm64)
1118

19+
FAILURE=0
20+
FILTER="Exporting indices|Deleting files no longer referenced|replacing .* with equal version"
21+
1222
for d in "${DISTRO[@]}"; do
1323
for a in "${ARCH[@]}"; do
14-
echo
15-
echo "Moving packages from $d-testing -> $d ($a)"
24+
ici_log
25+
ici_log "Moving packages from $d-testing -> $d ($a)"
1626
# Move deb packages from testing to production stage
1727
pkgs=$(reprepro -A "$a" -T deb list "$d-testing" | cut -s -d " " -f 2)
1828
# shellcheck disable=SC2086
19-
reprepro -A "$a" copy "$d" "$d-testing" $pkgs
29+
ici_filter_out "$FILTER" reprepro -A "$a" copy "$d" "$d-testing" $pkgs || FAILURE=1
2030

2131
# Move dsc packages from testing to production stage
2232
if [ "$a" == "amd64" ]; then
2333
pkgs=$(reprepro -T dsc list "$d-testing" | cut -s -d " " -f 2)
2434
for pkg in $pkgs; do
25-
reprepro -T dsc copysrc "$d" "$d-testing" "$pkg"
35+
printf "."
36+
ici_filter_out "$FILTER" reprepro -T dsc copysrc "$d" "$d-testing" "$pkg" || FAILURE=1
2637
done
2738
fi
2839
done
2940
done
3041

3142
# reprepro -A $ARCH remove "$DISTRO-testing" $pkgs
43+
44+
ici_exit "$FAILURE"

0 commit comments

Comments
 (0)