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.
This commit is contained in:
parent
1745ea4173
commit
ba62c10575
@ -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() {
|
_show_usage() {
|
||||||
echo "Usage: ./build-package.sh [options] PACKAGE_1 PACKAGE_2 ..."
|
echo "Usage: ./build-package.sh [options] PACKAGE_1 PACKAGE_2 ..."
|
||||||
echo
|
echo
|
||||||
@ -237,8 +243,6 @@ while (($# > 0)); do
|
|||||||
|
|
||||||
# Check the package to build:
|
# Check the package to build:
|
||||||
TERMUX_PKG_NAME=$(basename "$1")
|
TERMUX_PKG_NAME=$(basename "$1")
|
||||||
export TERMUX_SCRIPTDIR
|
|
||||||
TERMUX_SCRIPTDIR=$(cd "$(dirname "$0")"; pwd)
|
|
||||||
if [[ $1 == *"/"* ]]; then
|
if [[ $1 == *"/"* ]]; then
|
||||||
# Path to directory which may be outside this repo:
|
# 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
|
if [ ! -d "$1" ]; then termux_error_exit "'$1' seems to be a path but is not a directory"; fi
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
termux_step_setup_variables() {
|
termux_step_setup_variables() {
|
||||||
# shellcheck source=scripts/properties.sh
|
|
||||||
. "$TERMUX_SCRIPTDIR/scripts/properties.sh"
|
|
||||||
: "${TERMUX_MAKE_PROCESSES:="$(nproc)"}"
|
: "${TERMUX_MAKE_PROCESSES:="$(nproc)"}"
|
||||||
: "${TERMUX_TOPDIR:="$HOME/.termux-build"}"
|
: "${TERMUX_TOPDIR:="$HOME/.termux-build"}"
|
||||||
: "${TERMUX_ARCH:="aarch64"}" # arm, aarch64, i686 or x86_64.
|
: "${TERMUX_ARCH:="aarch64"}" # arm, aarch64, i686 or x86_64.
|
||||||
|
Loading…
Reference in New Issue
Block a user