From 8acfa01d48ac25ab862d0332919ca2aa53e49a59 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sun, 5 May 2019 20:21:16 +0200 Subject: [PATCH] termux_step_install_license: error if no LICENSE file is installed --- scripts/build/termux_step_install_license.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build/termux_step_install_license.sh b/scripts/build/termux_step_install_license.sh index a66410533..995dd22c7 100644 --- a/scripts/build/termux_step_install_license.sh +++ b/scripts/build/termux_step_install_license.sh @@ -8,7 +8,6 @@ termux_step_install_license() { else local COUNTER=0 for LICENSE in $(echo $TERMUX_PKG_LICENSE | sed 's/,/ /g'); do - echo "checking for $TERMUX_SCRIPTDIR/packages/termux-licenses/LICENSES/${LICENSE}.txt" if [ -f "$TERMUX_SCRIPTDIR/packages/termux-licenses/LICENSES/${LICENSE}.txt" ]; then if [[ $COUNTER > 0 ]]; then ln -sf "../LICENSES/${LICENSE}.txt" "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME/LICENSE.${COUNTER}" @@ -18,5 +17,8 @@ termux_step_install_license() { fi COUNTER=$((COUNTER + 1)) done + if [ ! -f "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME/LICENSE*" ]; then + termux_error_exit "No LICENSE file was installed for $TERMUX_PKG_NAME" + fi fi }