diff --git a/README.md b/README.md index 890ff5f..769a368 100644 --- a/README.md +++ b/README.md @@ -75,36 +75,27 @@ For ease of use, you need to grant every user in the `qemu` group via `sudo` the right to execute commands as `qemu`. You can find an example `sudoers` rule in this repo's `etc/sudoers.d` folder. -### Add `qemush` in the `PATH` +### Via `Makefile` (recommended) -Use your preferred way to add the `qemush` script to a folder of `PATH`. -Recommended: copy the script in `/usr/local/bin` to make it effortlessly -system wide. - -### Add `qemush` modules in `~qemu/bin` - -`qemush` needs reusable script modules like `diskpath` in its custom `bin` -folder located at `~qemu/bin`. You can add them directly via `qemush` from -this repo via the following command : +Just run the following command at the root of this repository to install +`qemush` (previous step is **mandatory**) : ```sh -qemush do 'mkdir -p ~/bin && cp -v qemu/bin/* "$_"' +make ``` -### Extra: add `first-free-port` in `PATH` +> And what if I don't want to bindly run this obscure `Makefile` ??? -`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 -after `argv[1]`, or `argv[1]` if it is free. You will need it to allocate -ports to protocols like SPICE in your launching scripts (example in -`qemu/bin/*-spice`). +You'd be right. The next section is the exhaustive list of steps handled +by the `Makefile` for the installation process. -Example `qemush` command to add the program to a local `qemu` `bin` folder -: +### Manual installation (what does the `Makefile` do) -```sh -qemush do 'mkdir ~/bin && cc -o "${_}/first-free-port" src/first-free-port.c' -``` +- Create `images`, `launchers` and `bin` directories in `~qemu` +- Copy `qemush` scripts parts from `qemu/bin` in `~qemu/bin` with mode +`740` +- Compile C programs from `src` in `~qemu/bin` with mode `740` +- Copy `bin/qemush` to `/usr/local/bin/qemush` with mode `755` ## Usage