-
Notifications
You must be signed in to change notification settings - Fork 1
/
arm-includer
executable file
·64 lines (53 loc) · 954 Bytes
/
arm-includer
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -e
INPUT=~/var/arm-results
for D in "$INPUT"/results.*; do
BD=$(basename "$D")
if [[ "$BD" =~ \.([a-z]+)$ ]]; then
DIST=${BASH_REMATCH[1]}
else
continue
fi
if [[ "$BD" =~ ^results\.([a-z-]+)\. ]]; then
PKG=${BASH_REMATCH[1]}
else
continue
fi
case "$PKG" in
rtpengine)
REPO=~/htdocs/dfx.at/rtpengine
SUB_REPO=true
;;
subsurface|subsurface-beta)
REPO=~/htdocs/dfx.at/subsurface
SUB_REPO=false
;;
*)
continue
esac
for F in "$D"/*; do
case "$F" in
*_armhf.deb|*_arm64.deb)
;;
*)
rm -f "$F" || true
continue
;;
esac
REPO_DST=$REPO
if $SUB_REPO; then
if [[ "$F" =~ _[0-9]+~ ]]; then
REL=beta
elif [[ "$F" =~ _([0-9]+\.[0-9]+)\.[0-9]+\.[0-9]+- ]]; then
REL=${BASH_REMATCH[1]}
else
rm -f "$F"
continue
fi
REPO_DST="$REPO"/"$REL"
fi
reprepro -Vb "$REPO_DST" -C main includedeb "$DIST" "$F"
rm -f "$F"
done
rmdir "$D"
done