Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bin/mkosi-initrd and bin/mkosi-sandbox wrappers and some cleanups #3010

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bin/mkosi
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
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
# which is equal to "False" in python.
# Note the check seems to be inverted here because the if branch is
# executed when the exit status is 0 which is equal to False in Python.
if python3 -c "import sys; sys.exit(sys.version_info < (3, 9))"; then
MKOSI_INTERPRETER=python3
elif command -v python3.9 >/dev/null; then
Expand All @@ -17,4 +18,4 @@ if [ -z "$MKOSI_INTERPRETER" ]; then
fi
fi

exec "$MKOSI_INTERPRETER" -B -m mkosi "$@"
exec "$MKOSI_INTERPRETER" -B -m "$command" "$@"
1 change: 1 addition & 0 deletions bin/mkosi-initrd
1 change: 1 addition & 0 deletions bin/mkosi-sandbox
Loading
Loading