improve(termux_step_create_pacman_install_hook.sh): adding preupg and postupg function (#12409)

This commit is contained in:
Ivan Max 2022-10-18 07:19:25 +00:00 committed by GitHub
parent 62b10995a2
commit 92bc24d573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -13,6 +13,18 @@ termux_step_create_pacman_install_hook() {
echo "}" >> .INSTALL
rm -f postinst
fi
if [ -f "./preupg" ]; then
echo "pre_upgrade() {" >> .INSTALL
cat preupg | grep -v '^#' >> .INSTALL
echo "}" >> .INSTALL
rm -f preupg
fi
if [ -f "./postupg" ]; then
echo "post_upgrade() {" >> .INSTALL
cat postupg | grep -v '^#' >> .INSTALL
echo "}" >> .INSTALL
rm -f postupg
fi
if [ -f "./prerm" ]; then
echo "pre_remove() {" >> .INSTALL
cat prerm | grep -v '^#' >> .INSTALL