diff options
author | Britney Fransen <brfransen@gmail.com> | 2022-12-07 21:45:30 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2022-12-07 21:45:30 (GMT) |
commit | 0d1d564592bc83718c49dab11d9b1cb6c9ceec9f (patch) | |
tree | d13f9ffdb8a3bb9846af24f1d90af7e4cde6c2c1 /linhes/linhes-dev/mp.py | |
parent | dfd71a19b63b0784bff6ac79ccdf368650ec72ad (diff) | |
download | linhes_pkgbuild-0d1d564592bc83718c49dab11d9b1cb6c9ceec9f.zip linhes_pkgbuild-0d1d564592bc83718c49dab11d9b1cb6c9ceec9f.tar.gz linhes_pkgbuild-0d1d564592bc83718c49dab11d9b1cb6c9ceec9f.tar.bz2 |
linhes-dev: mp.py: add ability to run mp_preflight
add a mp_preflight file to the PKGBUILD directory and mp.py will execute the cmds in the file that need to be run before running makepkg. See linhes-templates for example
Diffstat (limited to 'linhes/linhes-dev/mp.py')
-rwxr-xr-x | linhes/linhes-dev/mp.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/linhes/linhes-dev/mp.py b/linhes/linhes-dev/mp.py index f415b29..f8d660b 100755 --- a/linhes/linhes-dev/mp.py +++ b/linhes/linhes-dev/mp.py @@ -1,6 +1,7 @@ #!/usr/bin/env python -# Version 3.0.2 +# Version 3.0.3 import os +import stat import sys import re import subprocess @@ -304,6 +305,15 @@ class Packagefile(object): self.set_srcpkg() self.pkgrel_incremented = True + def runPreFlight(self): + if os.path.isfile("mp_preflight"): + print("- Running PreFlight...") + os.chmod("mp_preflight", 0o755) + retcode = subprocess.call(["./mp_preflight"]) + if retcode != 0: + print(" ERROR: PreFlight Error") + print("") + def updateSUMS(self): print("- Updating checksums...") retcode = subprocess.call(["updpkgsums"]) @@ -520,6 +530,7 @@ def main(): packagefile.find_repo() packagefile.increase_pkgrel() + packagefile.runPreFlight() packagefile.print_vars() packagefile.updateSUMS() if packagefile.make_package(): |