chiark
/
gitweb
/
~mdw
/
termux-packages
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f2f4aa2
)
build-all.sh: add option for debug builds
author
Henrik Grimler
<henrik@grimler.se>
Sun, 4 Mar 2018 16:57:38 +0000
(16:57 +0000)
committer
Fredrik Fornwall
<fredrik@fornwall.net>
Mon, 5 Mar 2018 10:29:53 +0000
(11:29 +0100)
build-all.sh
patch
|
blob
|
blame
|
history
diff --git
a/build-all.sh
b/build-all.sh
index a35465f2d9638f6bf1a268dbd5aa43075d5d8947..613ce8a76e9b6eba001364d4383ebf660bf6eba5 100755
(executable)
--- a/
build-all.sh
+++ b/
build-all.sh
@@
-7,16
+7,20
@@
set -e -u -o pipefail
test -f $HOME/.termuxrc && . $HOME/.termuxrc
: ${TERMUX_TOPDIR:="$HOME/.termux-build"}
: ${TERMUX_ARCH:="aarch64"}
test -f $HOME/.termuxrc && . $HOME/.termuxrc
: ${TERMUX_TOPDIR:="$HOME/.termux-build"}
: ${TERMUX_ARCH:="aarch64"}
+: ${TERMUX_DEBUG:=""}
_show_usage () {
_show_usage () {
- echo "Usage: ./build-all.sh [-a ARCH]"
- echo "Build all packages. ARCH is one of aarch64 (default), arm, i686 or x86_64."
+ echo "Usage: ./build-all.sh [-a ARCH] [-d]"
+ echo "Build all packages."
+ echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all."
+ echo " -d Build with debug symbols."
exit 1
}
while getopts :a:hdDs option; do
case "$option" in
a) TERMUX_ARCH="$OPTARG";;
exit 1
}
while getopts :a:hdDs option; do
case "$option" in
a) TERMUX_ARCH="$OPTARG";;
+ d) TERMUX_DEBUG='-d';;
h) _show_usage;;
esac
done
h) _show_usage;;
esac
done
@@
-57,7
+61,7
@@
for package_path in `cat $BUILDORDER_FILE`; do
echo -n "Building $package... "
BUILD_START=`date "+%s"`
echo -n "Building $package... "
BUILD_START=`date "+%s"`
- bash -x $BUILDSCRIPT -a $TERMUX_ARCH -s $package \
+ bash -x $BUILDSCRIPT -a $TERMUX_ARCH -s $
TERMUX_DEBUG $
package \
> $BUILDALL_DIR/${package}.out 2> $BUILDALL_DIR/${package}.err
BUILD_END=`date "+%s"`
BUILD_SECONDS=$(( $BUILD_END - $BUILD_START ))
> $BUILDALL_DIR/${package}.out 2> $BUILDALL_DIR/${package}.err
BUILD_END=`date "+%s"`
BUILD_SECONDS=$(( $BUILD_END - $BUILD_START ))