antifob / incus-windows

Toolset for creating Windows images for Incus
21 stars 7 forks source link

lxc flag #3

Closed Brandl closed 2 months ago

Brandl commented 2 months ago

I'm running lxd instead of incus, so I tried by running

find incus-windows/ -type f -not -path "*/.git/*" -exec sed -i 's/incus/lxc/g' {} +

Worked like a charm. I would love to have a commandline switch for using lxd or if it tries lxc if incus is not avaliable.

I will try the same with incus-goad and report back :)

antifob commented 2 months ago

A less destructive method of achieving the same thing is to simply create a wrapper around lxc. e.g.

cd incus-windows
cat>incus<<__EOF__
#!/bin/sh
exec lxc "${@}"
__EOF__
chmod +x incus
export PATH="$(pwd):${PATH}"

I might consider supporting LXD explicitly if their command-lines are no longer interchangeable, but, at this point in time, it is easily worked around. :)