logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: fc6aee0c5fef07de7158a1222f07608af2c58c1e
parent 9179f4bd013fbd323d11d861a0c15f37a94f8c5b
Author: Eduardo Sánchez Muñoz <eduardosm-dev@e64.io>
Date:   Wed, 27 Dec 2023 12:32:55 +0100

Avoid double slash (`//`) in generated scripts

e.g., put `bash /steps/1.sh` instead of `bash /steps//1.sh`

Diffstat:

Mseed/script-generator.c6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/seed/script-generator.c b/seed/script-generator.c @@ -461,8 +461,10 @@ void output_call_script(FILE *out, char *type, char *name, int using_bash, int s fputs("kaem --file ", out); } fputs("/steps/", out); - fputs(type, out); - fputs("/", out); + if (strlen(type) != 0) { + fputs(type, out); + fputs("/", out); + } fputs(name, out); fputs(".sh\n", out); }