diff options
-rwxr-xr-x | scripts/generate_phase_snippets.py | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/scripts/generate_phase_snippets.py b/scripts/generate_phase_snippets.py index bd2c178..5d769dc 100755 --- a/scripts/generate_phase_snippets.py +++ b/scripts/generate_phase_snippets.py @@ -22,18 +22,25 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. """ +# See Gentoo Developer Manual for a reference: +# https://devmanual.gentoo.org/ebuild-writing/functions/index.html#contents + EBUILD_PHASES=[ - "pkg_config", - "pkg_postinst", - "pkg_preinst", "pkg_pretend", + "pkg_nofetch", "pkg_setup", - "src_compile", - "src_configure", - "src_install", + "src_unpack", "src_prepare", + "src_configure", + "src_compile", "src_test", - "src_unpack", + "src_install", + "pkg_preinst", + "pkg_postinst", + "pkg_prerm", + "pkg_postrm", + "pkg_config", + "pkg_info", ] YASNIPPET_BODY="""# -*- mode: snippet; indent-tabs-mode: t; -*- @@ -74,6 +81,8 @@ def main(): for ebuild_phase in EBUILD_PHASES: yas_file_path = f"./snippets/ebuild-mode/{ebuild_phase}.yas" + print(f"Generating: \"{yas_file_path}\"...") + with open(yas_file_path, "w", encoding="utf-8") as yas_file_buffer: yas_file_buffer.write( YASNIPPET_BODY % (ebuild_phase, ebuild_phase, ebuild_phase) |