summaryrefslogtreecommitdiffstats
path: root/src/bin/oneshot-make
diff options
context:
space:
mode:
authorPS <p@0x53.net>2026-02-01 12:02:03 +0100
committerPS <p@0x53.net>2026-02-01 12:02:03 +0100
commit980c5408489a3a3a56e49c3873f1bce6a0155cad (patch)
tree91df5fa62e7eca03d04b8ed114b20b337b99a556 /src/bin/oneshot-make
downloadgoetia-base-980c5408489a3a3a56e49c3873f1bce6a0155cad.tar.gz
goetia-base-980c5408489a3a3a56e49c3873f1bce6a0155cad.tar.bz2
goetia-base-980c5408489a3a3a56e49c3873f1bce6a0155cad.zip
version 0.2.0.0
Diffstat (limited to 'src/bin/oneshot-make')
-rwxr-xr-xsrc/bin/oneshot-make22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/bin/oneshot-make b/src/bin/oneshot-make
new file mode 100755
index 0000000..4d255b2
--- /dev/null
+++ b/src/bin/oneshot-make
@@ -0,0 +1,22 @@
+#!@shebangdir@/execlineb -WS5
+
+# ISC license.
+
+multisubstitute {
+ define WORKINGDIR ${1}
+ define NAME ${2}
+ define UPSCRIPT ${3}
+ define DOWNSCRIPT ${4}
+ define DEPENDENCIES ${5}
+}
+
+if { mkdir -p ${WORKINGDIR}/${NAME} }
+
+background { redirfd -w 1 ${WORKINGDIR}/${NAME}/type echo oneshot }
+background { redirfd -w 1 ${WORKINGDIR}/${NAME}/up echo ${UPSCRIPT} }
+background { redirfd -w 1 ${WORKINGDIR}/${NAME}/down echo ${DOWNSCRIPT} }
+background {
+ if { eltest -v 5 }
+ if { mkdir -p ${WORKINGDIR}/${NAME}/dependencies.d }
+ touch ${WORKINGDIR}/${NAME}/dependencies.d/${DEPENDENCIES}
+}