DH-EXEC-SUBST(1)
π DH-EXEC-SUBST β the dh-exec substitution bestie π
ok so real talk, this is the dh-exec-subst page from the dh-exec manual, section 1 (that's the "commands you type" section, iykyk). Sit down, hydrate, we're doing substitution scripts π«Ά
β¨ SYNOPSIS β¨
#! /usr/bin/dh-exec
src/libfoo-*.so.* debian/foo-plugins/usr/lib/foo/${DEB_HOST_MULTIARCH}/
like. that's it. that's the whole vibe. look at that ${DEB_HOST_MULTIARCH} doing its little dance π§
πΈ DESCRIPTION πΈ
okay so first things first bestie β this program is a sub-command of dh-exec(1), and it must NOT be run directly. Ever. It's not that kind of girl. You run it through dh-exec, which will automatically run all available sub-commands if you run it bare, or you can be explicit and do it with dh-exec --with=subst. periodt π
What it actually is: a wrapper around the various other substitution helpers. It pipes your input file through all the available substitution helpers, one after another. The actual work? That's up to those scripts, not this one. This one is just the girl in the group chat forwarding the message. π
And here's the cute part: when a helper fails to expand a variable inside its input, it just leaves it as-is β no drama, no error β so that later in the pipeline some other program can maybe pick it up and expand it instead. team players only, no cap. π€
π SCRIPTS π
dh-exec-subst-env
Substitutes any of the available, exported environment variables into its input. And when I say any, I mean any β it does absolutely zero filtering. Whatever is chillin' in the environment is fair game for substitution, however unsafe that may be. She's fearless. She's reckless. She's iconic. π
Both ${FOO} and ${env:FOO} will expand to the environment variable FOO. The only difference: only the env form will error if the variable is unset, which is in keeping with debhelper(7) convention. so like, ${env:FOO} is the responsible one. π«‘
Introduced in version 0.1, with the env: format added in 0.29.
dh-exec-subst-multiarch
Attempts to expand any of the variables known to dpkg-architecture(1) β mostly useful for multi-arch support, which, slay. π
The command will query dpkg-architecture(1) directly, and does not rely on environment variables being set β because (and this is the tea) the called program will prefer already-set environment variables anyway. so it just goes straight to the source. main character energy fr fr. π
Introduced in version 0.1.
π ENVIRONMENT π
DH_EXEC_SCRIPTDIRβ tells you which directory the command-specific scripts should be sought for. If you don't specify it, scripts will be searched for in/usr/share/dh-exec/. that's the default, no notes. β¨
π¦ FILES π¦
$DH_EXEC_SCRIPTDIR/dh-exec-subst-*β the various scripts for the higher-level program. the whole squad. the entourage. π§
β VERSIONS β
The sub-command was introduced in dh-exec version 0.1. she's been here since the beginning, lowkey a legend. π
π SEE ALSO π
ok real talk bestie, one more time for the people in the back: do NOT run this directly. go throughdh-exec. ordh-exec --with=substif you're feeling specific. the pipeline handles the rest. π
and that's the page!! π this whole thing came from the dh-exec source, dated 2024-02-27 β go forth, substitute your variables, and remember: if a helper can't expand something, it just leaves it alone and lets the next girl try. πΈπ¦β¨
π¦ where this page comes from
- debian trixie: dh-exec 0.30 Β· GPL-3.0-or-later
- ubuntu noble: dh-exec 0.29build1 Β· GPL-3.0-or-later
- ubuntu questing: dh-exec 0.30
- ubuntu resolute: dh-exec 0.31 Β· GPL-3.0-or-later
- ubuntu stonking: dh-exec 0.31 Β· GPL-3.0-or-later
- Copyright 2011-2024 Software Freedom Conservancy, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms