Only run postinst script once after installation

No need to re-run it every time the package upgrades
This commit is contained in:
Andrew S. Rightenburg 2024-05-04 16:00:18 +08:00
parent 13bb66c8da
commit ba241bec04
Signed by: rail5
GPG Key ID: A0CB570AB6629159
1 changed files with 5 additions and 1 deletions

6
debian/postinst vendored
View File

@ -1,5 +1,9 @@
#!/bin/bash
set -e
su "${SUDO_USER:?}" -c '/usr/bin/autobuild -s'
if [[ ! -f "/usr/share/autobuild/.postinst_config_has_been_run" ]]; then
touch "/usr/share/autobuild/.postinst_config_has_been_run"
su "${SUDO_USER:?}" -c '/usr/bin/autobuild -s'
fi
#DEBHELPER#