proot-distro: fix paths in postinst script

This commit is contained in:
Leonid Pliushch 2020-09-03 15:51:50 +03:00
parent 6ac5d6c37c
commit 2ef2748898

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Termux official utility for managing proot'ed Linux dist
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=0.8
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/termux/proot-distro/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=cbcd4b652e383e732a2be9aedce60519b5db9ffb95ea4909c2ee2f296abc477c
TERMUX_PKG_DEPENDS="bash, bzip2, coreutils, curl, findutils, gzip, ncurses-utils, proot, tar, xz-utils"
@ -27,10 +27,10 @@ termux_step_create_debscripts() {
# Create compatibility symlink ubuntu.sh --> ubuntu-20.04.sh.
cat <<- POSTINST_EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ -f "$TERMUX_PREFIX/etc/ubuntu.sh" ]; then
mv -f "$TERMUX_PREFIX/etc/ubuntu.sh" "$TERMUX_PREFIX/etc/ubuntu-20.04.sh"
if [ -f "$TERMUX_PREFIX/etc/proot-distro/ubuntu.sh" ]; then
mv -f "$TERMUX_PREFIX/etc/proot-distro/ubuntu.sh" "$TERMUX_PREFIX/etc/proot-distro/ubuntu-20.04.sh"
fi
ln -sfr "$TERMUX_PREFIX/etc/ubuntu-20.04.sh" "$TERMUX_PREFIX/etc/ubuntu.sh"
ln -sfr "$TERMUX_PREFIX/etc/proot-distro/ubuntu-20.04.sh" "$TERMUX_PREFIX/etc/proot-distro/ubuntu.sh"
exit 0
POSTINST_EOF