Browse Source

Revert "termux_step_install_{license,service_script}: install to massage dir"

This reverts commit aa61bbf0b8.
build-on-device
Henrik Grimler 5 years ago
parent
commit
a1595e3c93
  1. 12
      scripts/build/termux_step_install_license.sh
  2. 4
      scripts/build/termux_step_install_service_scripts.sh

12
scripts/build/termux_step_install_license.sh

@ -1,7 +1,7 @@
termux_step_install_license() { termux_step_install_license() {
[ "$TERMUX_PKG_METAPACKAGE" = "true" ] && return [ "$TERMUX_PKG_METAPACKAGE" = "true" ] && return
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME" mkdir -p "$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME"
if [ ! "${TERMUX_PKG_LICENSE_FILE}" = "" ]; then if [ ! "${TERMUX_PKG_LICENSE_FILE}" = "" ]; then
local LICENSE local LICENSE
@ -9,7 +9,7 @@ termux_step_install_license() {
if [ ! -f "$TERMUX_PKG_SRCDIR/$LICENSE" ]; then if [ ! -f "$TERMUX_PKG_SRCDIR/$LICENSE" ]; then
termux_error_exit "$TERMUX_PKG_SRCDIR/$LICENSE does not exist" termux_error_exit "$TERMUX_PKG_SRCDIR/$LICENSE does not exist"
fi fi
cp -f "${TERMUX_PKG_SRCDIR}/${LICENSE}" "$TERMUX_MASSAGEDIR/${TERMUX_PREFIX}/share/doc/${TERMUX_PKG_NAME}"/ cp -f "${TERMUX_PKG_SRCDIR}/${LICENSE}" "${TERMUX_PREFIX}/share/doc/${TERMUX_PKG_NAME}"/
done done
else else
local COUNTER=0 local COUNTER=0
@ -17,16 +17,16 @@ termux_step_install_license() {
while read -r LICENSE; do while read -r LICENSE; do
if [ -f "$TERMUX_SCRIPTDIR/packages/termux-licenses/LICENSES/${LICENSE}.txt" ]; then if [ -f "$TERMUX_SCRIPTDIR/packages/termux-licenses/LICENSES/${LICENSE}.txt" ]; then
if [[ $COUNTER -gt 0 ]]; then if [[ $COUNTER -gt 0 ]]; then
ln -sf "../../LICENSES/${LICENSE}.txt" "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME/LICENSE.${COUNTER}" ln -sf "../../LICENSES/${LICENSE}.txt" "$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME/LICENSE.${COUNTER}"
else else
ln -sf "../../LICENSES/${LICENSE}.txt" "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME/LICENSE" ln -sf "../../LICENSES/${LICENSE}.txt" "$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME/LICENSE"
fi fi
fi fi
COUNTER=$((COUNTER + 1)) COUNTER=$((COUNTER + 1))
done < <(echo "$TERMUX_PKG_LICENSE" | sed "s/,/\n/g") done < <(echo "$TERMUX_PKG_LICENSE" | sed "s/,/\n/g")
for LICENSE in "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME"/LICENSE*; do for LICENSE in "$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME"/LICENSE*; do
if [ "$LICENSE" = "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME/LICENSE*" ]; then if [ "$LICENSE" = "$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME/LICENSE*" ]; then
termux_error_exit "No LICENSE file was installed for $TERMUX_PKG_NAME" termux_error_exit "No LICENSE file was installed for $TERMUX_PKG_NAME"
fi fi
done done

4
scripts/build/termux_step_install_service_scripts.sh

@ -7,8 +7,8 @@ termux_step_install_service_scripts() {
termux_error_exit "TERMUX_PKG_SERVICE_SCRIPT has to be an array of even length" termux_error_exit "TERMUX_PKG_SERVICE_SCRIPT has to be an array of even length"
fi fi
mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/service mkdir -p $TERMUX_PREFIX/var/service
cd $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/service cd $TERMUX_PREFIX/var/service
for ((i=0; i<${array_length}; i+=2)); do for ((i=0; i<${array_length}; i+=2)); do
mkdir -p ${TERMUX_PKG_SERVICE_SCRIPT[$i]} mkdir -p ${TERMUX_PKG_SERVICE_SCRIPT[$i]}
# We unlink ${TERMUX_PKG_SERVICE_SCRIPT[$i]}/run if it exists to # We unlink ${TERMUX_PKG_SERVICE_SCRIPT[$i]}/run if it exists to

Loading…
Cancel
Save