ZMK.SCRIPT(5)
π ZMK.SCRIPT(5) π
okay bestie, so this is the manual page for zmk.Script β it's giving template for describing interpreted scripts, and honestly? she's a whole vibe. come sit with me, we're gonna go through it together π«Ά
β¨ NAME β¨
Script β the template for describing interpreted scripts. like, scripts that get interpreted, not compiled. iykyk π
πΈ SYNOPSIS πΈ
include z.mk
# scriptName is the name of the script file
$(eval $(call ZMK.Expand,Program,scriptName))
no cap, that's the whole incantation. scriptName is literally just the name of the script file. periodt β¨
π¦ DESCRIPTION π¦
so the Script template, once you expand it with a script name, creates the rules for installing and removing a single script written in an interpreted programming language. one script, one template call, chef's kiss π
and β plot twist β if your script is a shell script, it can be automatically checked with shellcheck, if available. not me being thorough π
π TARGETS π
this module hands you these targets. main character energy, every single one.
π install
this phony target copies $(scriptName) over to $(scriptName.InstallDir), using the name $(scriptName.InstallName) and the mode $(scriptName.InstallMode). and if the target directory doesn't exist yet? it just creates it automatically. so helpful, so iconic π
also!! the variables Configure.ProgramPrefix, Configure.ProgramSuffix and Configure.ProgramTransformName automatically impact the installed names of all the scripts. like they just do that. obsessed.
π uninstall
this phony target removes $(scriptName) β the exact thing the install target put there. reverse uno card π«Ά
π§ static-check-shellcheck
this phony target uses shellcheck to perform static analysis of compatible scripts. only the compatible ones though, bestie. she's not gonna waste her time π
β static-check
this phony target depends on the target static-check-shellcheck. that's it. that's the whole job. queen of delegation π
π VARIABLES π
this module provides these variables. get comfy.
πΈ $(scriptName).Interpreter
the name of the script interpreter.
the default value is inferred from the extension of the file name. so she's reading the room, basically. π₯
π $(scriptName).InstallDir
the directory $(scriptName) is installed to.
the default value is $(bindir). and here's the spicy bit: the special value noinst disables the rules related to installation and uninstallation. so if you set noinst, install and uninstall just⦠don't happen. periodt.
π¦ $(scriptName).InstallName
the name of the script after installation. glow-up name, if you will.
the default value is $(scriptName). so if you don't say anything, she keeps her government name β¨
π $(scriptName).InstallMode
the UNIX mode $(scriptName) is installed with.
the default value is 0755. so yeah, she's executable, as she should be π
π DESTDIR
path added to all installation targets.
this variable is normally set externally β specifically to install a compiled program into a staging area during construction of a compiled binary package. so it's like, the "where am i actually putting this right now" variable. iykyk π«Ά
π§ IMPLEMENTATION NOTES π§
Script uses InstallUninstall to handle installation and removal. that's the whole note. she said "reuse, don't reinvent" π
π HISTORY π
the Script template first appeared in zmk 0.1. so she's been here from the beginning, a true OG π
π AUTHORS π
Zygmunt Krynicki <me@zygoon.pl> β the legend herself π«Ά
and that's the whole page, bestie!! this one is from zmk 0.5.1, dated May 3, 2020, and the page is zmk.Script(5). go forth and install your scripts, you absolute icon πβ¨π
π¦ where this page comes from
- debian bookworm: zmk-doc 0.5.1-2 Β· LGPL-3.0-only
- debian trixie: zmk-doc 0.5.1-2 Β· LGPL-3.0-only
- ubuntu jammy: zmk-doc 0.5.1-2 Β· LGPL-3.0-only
- ubuntu noble: zmk-doc 0.5.1-2 Β· LGPL-3.0-only
- ubuntu questing: zmk-doc 0.5.1-2
- ubuntu resolute: zmk-doc 0.5.1-2build1 Β· LGPL-3.0-only
- ubuntu stonking: zmk-doc 0.5.1-2build1 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms