Browse Source

termux_step_install_license: error if no LICENSE file is installed

emacs-27
Henrik Grimler 6 years ago
committed by Leonid Plyushch
parent
commit
8acfa01d48
  1. 4
      scripts/build/termux_step_install_license.sh

4
scripts/build/termux_step_install_license.sh

@ -8,7 +8,6 @@ termux_step_install_license() {
else else
local COUNTER=0 local COUNTER=0
for LICENSE in $(echo $TERMUX_PKG_LICENSE | sed 's/,/ /g'); do 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 [ -f "$TERMUX_SCRIPTDIR/packages/termux-licenses/LICENSES/${LICENSE}.txt" ]; then
if [[ $COUNTER > 0 ]]; then if [[ $COUNTER > 0 ]]; then
ln -sf "../LICENSES/${LICENSE}.txt" "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME/LICENSE.${COUNTER}" ln -sf "../LICENSES/${LICENSE}.txt" "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME/LICENSE.${COUNTER}"
@ -18,5 +17,8 @@ termux_step_install_license() {
fi fi
COUNTER=$((COUNTER + 1)) COUNTER=$((COUNTER + 1))
done 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 fi
} }

Loading…
Cancel
Save