mirror of
https://github.com/0xbbjubjub/miniguest.git
synced 2025-01-06 03:45:49 +03:00
add template subcommand
This commit is contained in:
parent
8c48fbed0d
commit
67f392e120
5
USAGE.md
5
USAGE.md
@ -2,7 +2,10 @@
|
||||
## Imperative guests
|
||||
|
||||
A guest declaration must live in a Nix Flake. To get started, you can use the
|
||||
flake template.
|
||||
flake template with the following shortcut:
|
||||
```sh
|
||||
miniguest template my-guests/
|
||||
```
|
||||
|
||||
To build and deploy a guest, run
|
||||
```sh
|
||||
|
@ -39,4 +39,7 @@ remove)
|
||||
create)
|
||||
source create.bash
|
||||
;;
|
||||
template)
|
||||
source template.bash
|
||||
;;
|
||||
esac
|
||||
|
@ -16,7 +16,7 @@
|
||||
# along with Miniguest. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# ARG_POSITIONAL_SINGLE(command, subcommand to run)
|
||||
# ARG_TYPE_GROUP_SET(commands, COMMAND, command, [install,upgrade,remove,create,help])
|
||||
# ARG_TYPE_GROUP_SET(commands, COMMAND, command, [install,upgrade,remove,create,template,help])
|
||||
# ARG_OPTIONAL_SINGLE(guests-dir, , directory containing guests profiles, /etc/miniguests)
|
||||
# ARG_OPTIONAL_SINGLE(nix, , path to the nix binary, @nixFlakes@/bin/nix)
|
||||
# ARG_LEFTOVERS(subcommand arguments)
|
||||
|
5
tool/template.bash
Normal file
5
tool/template.bash
Normal file
@ -0,0 +1,5 @@
|
||||
source template_arg.bash
|
||||
|
||||
dest_dir="$_arg_dest_dir"
|
||||
|
||||
run_nix flake new -t github:bbjubjub2494/miniguest "$dest_dir"
|
2
tool/template_arg.bash
Normal file
2
tool/template_arg.bash
Normal file
@ -0,0 +1,2 @@
|
||||
# ARG_POSITIONAL_SINGLE(dest-dir, destination directory)
|
||||
# ARGBASH_GO
|
Loading…
Reference in New Issue
Block a user