qemush : ajout commande run, documentation, dossier bin -> launchers
This commit is contained in:
parent
4a5327ca0a
commit
00b9c552ca
8 changed files with 17 additions and 6 deletions
14
README.md
14
README.md
|
@ -81,10 +81,16 @@ system wide.
|
||||||
|
|
||||||
`first-free-port` is a small C program designed accordingly to the Unix
|
`first-free-port` is a small C program designed accordingly to the Unix
|
||||||
philosophy to show in `stdout` the first free (not listening) TCP port
|
philosophy to show in `stdout` the first free (not listening) TCP port
|
||||||
after `argv[1]`, or `argv[1]` if it is free. You can compile it and add
|
after `argv[1]`, or `argv[1]` if it is free. You will need it to allocate
|
||||||
it to your `PATH` if you need to allocate ports to protocols like SPICE in
|
ports to protocols like SPICE in your launching scripts (example in
|
||||||
your launching scripts (example in `qemu/bin/*-spice`). Its source is in
|
`qemu/bin/*-spice`).
|
||||||
`src` folder of this repository.
|
|
||||||
|
Example `qemush` command to add the program to a local `qemu` `bin` folder
|
||||||
|
:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
qemush do 'mkdir ~/bin && cc -o "${_}/first-free-port" src/first-free-port.c'
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@ exec_as() {
|
||||||
|
|
||||||
exec_as qemu "$@"
|
exec_as qemu "$@"
|
||||||
|
|
||||||
bin="${HOME}/bin"
|
bin="${HOME}/launchers"
|
||||||
images="${HOME}/images"
|
images="${HOME}/images"
|
||||||
PATH="${bin}:${PATH}"
|
PATH="${bin}:${HOME}/bin:${PATH}"
|
||||||
EDITOR="${EDITOR:-nvim}"
|
EDITOR="${EDITOR:-nvim}"
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
alias exec='exec '
|
alias exec='exec '
|
||||||
|
@ -47,6 +47,7 @@ ${name}: usage:
|
||||||
${name} shell - start a shell as user qemu
|
${name} shell - start a shell as user qemu
|
||||||
${name} help - show this help
|
${name} help - show this help
|
||||||
${name} add <path to script> [<VM name>] - add a launching script
|
${name} add <path to script> [<VM name>] - add a launching script
|
||||||
|
${name} run <command> - run shell input as user qemu
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +123,10 @@ public_add() {
|
||||||
trap - EXIT
|
trap - EXIT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public_run() {
|
||||||
|
sh -c "$*"
|
||||||
|
}
|
||||||
|
|
||||||
function="$1"
|
function="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue