Browse Source

build-package.sh: source properties.sh before handling command line arguments

Fixes problem when it is not possible to override TERMUX_ARCH set in ~/.termuxrc.
emacs-27
Leonid Plyushch 5 years ago
parent
commit
25955f9df5
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 8
      build-package.sh
  2. 2
      scripts/build/termux_step_setup_variables.sh

8
build-package.sh

@ -164,6 +164,12 @@ source scripts/build/termux_step_finish_build.sh
################################################################################
TERMUX_SCRIPTDIR=$(cd "$(dirname "$0")"; pwd)
export TERMUX_SCRIPTDIR
# shellcheck source=scripts/properties.sh
. "$TERMUX_SCRIPTDIR/scripts/properties.sh"
_show_usage() {
echo "Usage: ./build-package.sh [options] PACKAGE_1 PACKAGE_2 ..."
echo
@ -237,8 +243,6 @@ while (($# > 0)); do
# Check the package to build:
TERMUX_PKG_NAME=$(basename "$1")
export TERMUX_SCRIPTDIR
TERMUX_SCRIPTDIR=$(cd "$(dirname "$0")"; pwd)
if [[ $1 == *"/"* ]]; then
# Path to directory which may be outside this repo:
if [ ! -d "$1" ]; then termux_error_exit "'$1' seems to be a path but is not a directory"; fi

2
scripts/build/termux_step_setup_variables.sh

@ -1,6 +1,4 @@
termux_step_setup_variables() {
# shellcheck source=scripts/properties.sh
. "$TERMUX_SCRIPTDIR/scripts/properties.sh"
: "${TERMUX_MAKE_PROCESSES:="$(nproc)"}"
: "${TERMUX_TOPDIR:="$HOME/.termux-build"}"
: "${TERMUX_ARCH:="aarch64"}" # arm, aarch64, i686 or x86_64.

Loading…
Cancel
Save