tergent: allow to cancel package upgrade

This commit is contained in:
Leonid Pliushch 2020-11-22 22:38:30 +02:00
parent 8903ebb098
commit 76434e451c

View File

@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://github.com/aeolwyr/tergent
TERMUX_PKG_DESCRIPTION="A cryptoki/PKCS#11 library for Termux that uses Android Keystore as its backend" TERMUX_PKG_DESCRIPTION="A cryptoki/PKCS#11 library for Termux that uses Android Keystore as its backend"
TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_VERSION=1.0.0 TERMUX_PKG_VERSION=1.0.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/aeolwyr/tergent/archive/${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SRCURL=https://github.com/aeolwyr/tergent/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=0b59cf0ced3f693fb19396a986326963f3763e6bf65d3e56af0a03d206d69428 TERMUX_PKG_SHA256=0b59cf0ced3f693fb19396a986326963f3763e6bf65d3e56af0a03d206d69428
TERMUX_PKG_DEPENDS="termux-api" TERMUX_PKG_DEPENDS="termux-api"
@ -18,10 +19,14 @@ termux_step_create_debscripts() {
cat <<- EOF > ./postinst cat <<- EOF > ./postinst
#!${TERMUX_PREFIX}/bin/sh #!${TERMUX_PREFIX}/bin/sh
echo echo
echo "Tergent since v1.x is a library package." echo "Tergent since v1.x has some breaking changes."
echo echo
echo "Visit https://github.com/aeolwyr/tergent/blob/master/README.md for more information." echo "You will need new keys. See https://github.com/aeolwyr/tergent/blob/master/README.md#upgrading-from-01 for more details on how to upgrade."
echo echo
exit 0 read -p "Are you sure you're ready to upgrade? [yN] " yn
case \$yn in
[Yy]* ) exit 0;;
* ) exit 1;;
esac
EOF EOF
} }