diff --git a/packages/proot-distro/build.sh b/packages/proot-distro/build.sh index 38fa799de..76430e782 100644 --- a/packages/proot-distro/build.sh +++ b/packages/proot-distro/build.sh @@ -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 " TERMUX_PKG_VERSION=0.8 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_REVISION=3 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" @@ -24,17 +24,17 @@ termux_step_make_install() { } termux_step_create_debscripts() { - # Create compatibility symlink ubuntu.sh --> ubuntu-20.04.sh. + # Don't break older installations. cat <<- POSTINST_EOF > ./postinst #!$TERMUX_PREFIX/bin/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" + cp -f "$TERMUX_PREFIX/etc/proot-distro/ubuntu.sh" "$TERMUX_PREFIX/etc/proot-distro/ubuntu-20.04.sh" + else + cp -f "$TERMUX_PREFIX/etc/proot-distro/ubuntu-20.04.sh" "$TERMUX_PREFIX/etc/proot-distro/ubuntu.sh" fi - ln -sfr "$TERMUX_PREFIX/etc/proot-distro/ubuntu-20.04.sh" "$TERMUX_PREFIX/etc/proot-distro/ubuntu.sh" exit 0 POSTINST_EOF - # Delete compatibility symlink. cat <<- PRERM_EOF > ./prerm #!$TERMUX_PREFIX/bin/sh if [ "\$1" != "remove" ]; then