Use of sed when handling paths causes unwanted behaviour #50

Closed
opened 2020-12-11 20:57:02 +01:00 by looselyrigorous · 0 comments
looselyrigorous commented 2020-12-11 20:57:02 +01:00 (Migrated from github.com)

This issue is in reference to this line
0339f3f4f5/scripts/functions.sh (L300)
The user that I'm installing klipper and co to is called printeruser, which is then renamed to kiauhuser, causing the script to fail.

If the goal is to put the file besides printer.cfg then it's better to extract the dirname from $PRINTER_CFG. Something like this:

KIAUH_CFG="$(dirname $PRINTER_CFG)/kiauh.cfg"
This issue is in reference to this line https://github.com/th33xitus/kiauh/blob/0339f3f4f57ea93d1119a76ea82ac7b684b6ec26/scripts/functions.sh#L300 The user that I'm installing klipper and co to is called `printeruser`, which is then renamed to `kiauhuser`, causing the script to fail. If the goal is to put the file besides printer.cfg then it's better to extract the dirname from `$PRINTER_CFG`. Something like this: ```sh KIAUH_CFG="$(dirname $PRINTER_CFG)/kiauh.cfg" ```
Sign in to join this conversation.