-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharm-includer
More file actions
executable file
·61 lines (51 loc) · 1013 Bytes
/
arm-includer
File metadata and controls
executable file
·61 lines (51 loc) · 1013 Bytes
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
#!/bin/bash
set -e
INPUT=~/var/arm-results
for D in "$INPUT"/results.*; do
BD=$(basename "$D")
if [[ "$BD" =~ ^results\.[0-9]+\.([a-z0-9-]+)\.([a-z0-9.-]+)\.([a-z]+)\.([a-z0-9]+)$ ]]; then
PKG=${BASH_REMATCH[1]}
VER=${BASH_REMATCH[2]}
DIST=${BASH_REMATCH[3]}
ARCH=${BASH_REMATCH[4]}
else
if [[ "$BD" =~ ^results\.[0-9]+\.([a-z0-9-]+)\.([a-z]+)\.([a-z0-9]+)$ ]]; then
PKG=${BASH_REMATCH[1]}
VER=''
DIST=${BASH_REMATCH[2]}
ARCH=${BASH_REMATCH[3]}
else
continue
fi
fi
case "$PKG" in
rtpengine)
REPO=~/htdocs/dfx.at/rtpengine
SUB_REPO=true
;;
subsurface*)
REPO=~/htdocs/dfx.at/subsurface
SUB_REPO=false
;;
*)
continue
esac
for F in "$D"/*; do
case "$F" in
*.deb)
;;
*)
rm -f "$F" || true
continue
;;
esac
REPO_DST=$REPO
if $SUB_REPO; then
test -n "$VER"
REPO_DST="$REPO"/"$VER"
fi
reprepro -Vb "$REPO_DST" -P optional -S net -C main -A "$ARCH" includedeb "$DIST" "$F"
rm -f "$F"
done
rmdir "$D"
done