-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-all.sh
More file actions
31 lines (29 loc) · 809 Bytes
/
build-all.sh
File metadata and controls
31 lines (29 loc) · 809 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
#! /bin/sh
set -eu
set -o pipefail
export CARGO_TARGET_DIR=$(mktemp -d)
cd $(dirname $0)
apkdir=$(pwd)/apk
mgmtdir=$(pwd)/mgmt
draft1=${mgmtdir}/draft.list
draft2=${mgmtdir}/draft.list.$(uname -m)
cd ${apkdir}
do1(){
local dirname=$1
[ -f $dirname/APKBUILD ] || return
cd $dirname
abuild -r -k || exit 1
cd - > /dev/null
}
if [ "$*" = "" ]; then
for i in */APKBUILD; do
grep -q "^$(basename $(dirname $i))" ${draft1} && continue
[ -f ${draft2} ] && grep -q "^$(basename $(dirname $i))" ${draft2} && continue
do1 $(dirname $i) 2>&1 | sed -e 's,^>>> ERROR: \([^ :]*\):,::error file=apk/\1/APKBUILD::\1:,g;'
done
else
for i; do
do1 $i 2>&1 | sed -e 's,^>>> ERROR: \([^ :]*\):,::error file=apk/\1/APKBUILD::\1:,g;'
done
fi
apk-index || exit 1