Henrik Grimler
6 years ago
committed by
Leonid Plyushch
2 changed files with 19 additions and 17 deletions
@ -1,21 +1,22 @@ |
|||||
termux_step_install_license() { |
termux_step_install_license() { |
||||
mkdir -p "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME" |
mkdir -p "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME" |
||||
local COUNTER=0 |
if [ ! "${TERMUX_PKG_LICENSE_FILE}" = "" ]; then |
||||
for LICENSE in $(echo $TERMUX_PKG_LICENSE | sed 's/,/ /g'); do |
for LICENSE in $TERMUX_PKG_LICENSE_FILE; do |
||||
if [ -f "$TERMUX_SCRIPTDIR/packages/termux-licenses/LICENSES/${LICENSE}.txt" ]; then |
if [ ! -f "$TERMUX_PKG_SRCDIR/$LICENSE" ]; then termux_error_exit "$TERMUX_PKG_SRCDIR/$LICENSE does not exist"; fi |
||||
if [[ $COUNTER > 0 ]]; then |
cp ${TERMUX_PKG_SRCDIR}/${LICENSE} ${TERMUX_PREFIX}/share/${TERMUX_PKG_NAME} |
||||
ln -sf "../LICENSES/${LICENSE}.txt" "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME/LICENSE.${COUNTER}" |
done |
||||
else |
else |
||||
ln -sf "../LICENSES/${LICENSE}.txt" "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME/LICENSE" |
local COUNTER=0 |
||||
fi |
for LICENSE in $(echo $TERMUX_PKG_LICENSE | sed 's/,/ /g'); do |
||||
else |
echo "checking for $TERMUX_SCRIPTDIR/packages/termux-licenses/LICENSES/${LICENSE}.txt" |
||||
for POSSIBLE_LICENSE in "LICENSE*" "license*" "COPYRIGHT" "copyright"; do |
if [ -f "$TERMUX_SCRIPTDIR/packages/termux-licenses/LICENSES/${LICENSE}.txt" ]; then |
||||
if [ -f "$TERMUX_PKG_SRCDIR/$POSSIBLE_LICENSE" ]; then |
if [[ $COUNTER > 0 ]]; then |
||||
cp "$TERMUX_PKG_SRCDIR/$POSSIBLE_LICENSE" "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME/" |
ln -sf "../LICENSES/${LICENSE}.txt" "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME/LICENSE.${COUNTER}" |
||||
break |
else |
||||
|
ln -sf "../LICENSES/${LICENSE}.txt" "$TERMUX_PREFIX/share/$TERMUX_PKG_NAME/LICENSE" |
||||
fi |
fi |
||||
done |
fi |
||||
fi |
COUNTER=$((COUNTER + 1)) |
||||
COUNTER=$((COUNTER + 1)) |
done |
||||
done |
fi |
||||
} |
} |
||||
|
Loading…
Reference in new issue