Browse Source

build-package.sh: for on-device builds value of TERMUX_ARCH should not be overridable

This should be allowed only when cross-compiling.
emacs-27
Leonid Plyushch 5 years ago
parent
commit
88cc360984
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 8
      build-package.sh

8
build-package.sh

@ -12,8 +12,6 @@ if [ "$(uname -o)" = "Android" ] || [ -e "/system/bin/app_process" ]; then
exit 1 exit 1
fi fi
export TERMUX_ARCH=$(dpkg --print-architecture)
# This variable tells all parts of build system that build # This variable tells all parts of build system that build
# is performed on device. # is performed on device.
export TERMUX_ON_DEVICE_BUILD=true export TERMUX_ON_DEVICE_BUILD=true
@ -170,6 +168,12 @@ export TERMUX_SCRIPTDIR
# shellcheck source=scripts/properties.sh # shellcheck source=scripts/properties.sh
. "$TERMUX_SCRIPTDIR/scripts/properties.sh" . "$TERMUX_SCRIPTDIR/scripts/properties.sh"
if [ -n "$TERMUX_ON_DEVICE_BUILD" ]; then
# For on device builds cross compiling is not supported.
# Target architecture must be same as for environment used currently.
export TERMUX_ARCH=$(dpkg --print-architecture)
fi
_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

Loading…
Cancel
Save