Skip to content

Commit

Permalink
fish: mkosi_bld: Prepare for using mkosi from distribution
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <[email protected]>
  • Loading branch information
nathanchance committed Jan 24, 2025
1 parent d27d21d commit af72f2e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fish/functions/mkosi_bld.fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
# Copyright (C) 2024 Nathan Chancellor

function mkosi_bld -d "Build a distribution using mkosi"
# Normally, we should just be able to use mkosi from our distribution
# but we require some newer fixes and features at the moment
if not in_venv
# If mkosi is major version 25 or greater, we can use it directly.
# If it is not, we use a virtual environment for simple access.
if command -q mkosi; and test (mkosi --version | string match -gr '^mkosi ([0-9]+)') -ge 25
else if not in_venv
set venv_dir $PY_VENV_DIR/mkosi
if not test -e $venv_dir
py_venv c mkosi
Expand Down

0 comments on commit af72f2e

Please sign in to comment.