]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Add bin/mkosi-initrd and bin/mkosi-sandbox
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 8 Sep 2024 11:02:03 +0000 (13:02 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 12 Sep 2024 15:32:13 +0000 (17:32 +0200)
It is convenient to be able to invoke those two during development
too, just like mkosi itself.

bin/mkosi
bin/mkosi-initrd [new symlink]
bin/mkosi-sandbox [new symlink]

index a7ab306186d9b2e40bacb8d64b88dd72d7a1777a..bd43ca8208760d97c91758627b94c92062cee03c 100755 (executable)
--- a/bin/mkosi
+++ b/bin/mkosi
@@ -3,6 +3,7 @@
 set -e
 PYTHONPATH="$(dirname "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")")"
 export PYTHONPATH
+command="$(basename "${BASH_SOURCE[0]//-/.}")"
 
 if [ -z "$MKOSI_INTERPRETER" ]; then
     # Note the check seems to be inverted here because the if branch is executed when the exit status is 0
@@ -17,4 +18,4 @@ if [ -z "$MKOSI_INTERPRETER" ]; then
     fi
 fi
 
-exec "$MKOSI_INTERPRETER" -B -m mkosi "$@"
+exec "$MKOSI_INTERPRETER" -B -m "$command" "$@"
diff --git a/bin/mkosi-initrd b/bin/mkosi-initrd
new file mode 120000 (symlink)
index 0000000..b5f44fa
--- /dev/null
@@ -0,0 +1 @@
+mkosi
\ No newline at end of file
diff --git a/bin/mkosi-sandbox b/bin/mkosi-sandbox
new file mode 120000 (symlink)
index 0000000..b5f44fa
--- /dev/null
@@ -0,0 +1 @@
+mkosi
\ No newline at end of file