build-package.sh: -i/-I now available only for com.termux id

Before build-package.sh unconditionally downloaded deb files even when
application package name was different.
This commit is contained in:
Leonid Pliushch 2023-01-16 22:28:11 +02:00
parent 8d89be98c9
commit d82bd52f0f
No known key found for this signature in database
GPG Key ID: A109C088BB8EA41A
1 changed files with 10 additions and 1 deletions

View File

@ -446,11 +446,20 @@ while (($# >= 1)); do
-i)
if [ "$TERMUX_ON_DEVICE_BUILD" = "true" ]; then
termux_error_exit "./build-package.sh: option '-i' is not available for on-device builds"
elif [ "$TERMUX_PREFIX" != "/data/data/com.termux/files/usr" ]; then
termux_error_exit "./build-package.sh: option '-i' is available only when TERMUX_APP_PACKAGE is 'com.termux'"
else
export TERMUX_INSTALL_DEPS=true
fi
;;
-I) export TERMUX_INSTALL_DEPS=true && export TERMUX_NO_CLEAN=true;;
-I)
if [ "$TERMUX_PREFIX" != "/data/data/com.termux/files/usr" ]; then
termux_error_exit "./build-package.sh: option '-I' is available only when TERMUX_APP_PACKAGE is 'com.termux'"
else
export TERMUX_INSTALL_DEPS=true
export TERMUX_NO_CLEAN=true
fi
;;
-q) export TERMUX_QUIET_BUILD=true;;
-s) export TERMUX_SKIP_DEPCHECK=true;;
-o)