forked from termux/termux-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-all.sh
executable file
·26 lines (21 loc) · 888 Bytes
/
build-all.sh
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
#!/bin/bash
# build-all.sh - script to build all packages with a build order specified by buildorder.py
set -e -u -o pipefail
BUILDSCRIPT=`dirname $0`/build-package.sh
BUILDORDER_FILE=$HOME/termux/_buildall/buildorder.txt
if [ -e $BUILDORDER_FILE ]; then
echo "Continuing with existing buildorder file: $BUILDORDER_FILE"
else
rm -Rf $HOME/termux /data/data $HOME/termux/_buildall
mkdir -p $HOME/termux/_buildall
./buildorder.py > $BUILDORDER_FILE
fi
exec >> $HOME/termux/_buildall/ALL.out 2>> $HOME/termux/_buildall/ALL.err
for package in `cat $BUILDORDER_FILE`; do
echo -n "Building $package... " >> $HOME/termux/_buildall/ALL.out
BUILD_START=`date "+%s"`
bash -x $BUILDSCRIPT $package > $HOME/termux/_buildall/${package}.out 2> $HOME/termux/_buildall/${package}.err
BUILD_END=`date "+%s"`
BUILD_SECONDS=$(( $BUILD_END - $BUILD_START ))
echo "done in $BUILD_SECONDS"
done