scripts: export TERMUX_PACKAGE_FORMAT and TERMUX_PACKAGE_MANAGER

Otherwise these variables is not visible to child shells.  This caused
configure step of termux-tools to always use debian/apt combination,
since it checks for variables among environmental variables and they
were not visible.
This commit is contained in:
Henrik Grimler 2022-08-10 08:52:16 +02:00
parent 162fb8d95d
commit b044a49d0f
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
2 changed files with 3 additions and 3 deletions

View File

@ -370,7 +370,7 @@ while (($# >= 1)); do
if [ -z "$1" ]; then
termux_error_exit "./build-package.sh: argument to '--format' should not be empty"
fi
TERMUX_PACKAGE_FORMAT="$1"
export TERMUX_PACKAGE_FORMAT="$1"
else
termux_error_exit "./build-package.sh: option '--format' requires an argument"
fi

View File

@ -22,8 +22,8 @@ termux_step_setup_variables() {
fi
case "${TERMUX_PACKAGE_FORMAT-}" in
debian) TERMUX_PACKAGE_MANAGER="apt";;
pacman) TERMUX_PACKAGE_MANAGER="pacman";;
debian) export TERMUX_PACKAGE_MANAGER="apt";;
pacman) export TERMUX_PACKAGE_MANAGER="pacman";;
*) termux_error_exit "Unsupported package format \"${TERMUX_PACKAGE_FORMAT-}\". Only 'debian' and 'pacman' formats are supported";;
esac