diff options
author | Maciej Barć <xgqt@gentoo.org> | 2023-02-27 23:03:51 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-02-27 23:05:28 +0100 |
commit | 58425136f89a1dd72b2ae6141c4362b3c650563d (patch) | |
tree | 81dbc9722a2db11cfe6060e6e56d08c6fb482501 | |
parent | snippets/ebuild-mode: add has_version.yas (diff) | |
download | emacs-ebuild-snippets-58425136f89a1dd72b2ae6141c4362b3c650563d.tar.gz emacs-ebuild-snippets-58425136f89a1dd72b2ae6141c4362b3c650563d.tar.bz2 emacs-ebuild-snippets-58425136f89a1dd72b2ae6141c4362b3c650563d.zip |
scripts/generate_phase_snippets.py: add the rest of functions
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
-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) |