Let's add a new option called -O/--output-dir and if that is set, we write disk images to that directory based on the volume name with '.img' appended. Thus:
$ ubuntu-image -O /my/image/dir
and a volume name of 'pc' would leave you with /my/image/dir/pc.img
Now, to keep things simple, let's not change -o/--output but instead, we'll raise a warning and ignore it if there are multiple volumes in a gadget.yaml file.
If neither option is given, the we'll use <workdir>/images/ where <workdir> is given by -w/--workdir. If that option isn't given either, then we'll use the current working directory.
Here's another thought about -o/--output
Let's add a new option called -O/--output-dir and if that is set, we write disk images to that directory based on the volume name with '.img' appended. Thus:
$ ubuntu-image -O /my/image/dir
and a volume name of 'pc' would leave you with /my/image/ dir/pc. img
Now, to keep things simple, let's not change -o/--output but instead, we'll raise a warning and ignore it if there are multiple volumes in a gadget.yaml file.
If neither option is given, the we'll use <workdir>/images/ where <workdir> is given by -w/--workdir. If that option isn't given either, then we'll use the current working directory.