fix: typo

This commit is contained in:
th33xitus
2021-03-31 10:06:11 +02:00
parent adf087e3e5
commit 49b77162b0

View File

@@ -126,19 +126,21 @@ install_kiauh_macros(){
path=$(echo $config | rev | cut -d"/" -f2- | rev) path=$(echo $config | rev | cut -d"/" -f2- | rev)
if [ ! -f $path/kiauh_macros.cfg ]; then if [ ! -f $path/kiauh_macros.cfg ]; then
### copy kiauh_macros.cfg to config location ### copy kiauh_macros.cfg to config location
status_msg "Creating macro config file ..."
cp ${SRCDIR}/kiauh/resources/kiauh_macros.cfg $path cp ${SRCDIR}/kiauh/resources/kiauh_macros.cfg $path
ok_msg "$path/kiauh_macros.cfg created!"
### write the include to the very first line of the printer.cfg ### write the include to the very first line of the printer.cfg
sed -i "1 i [include kiauh_macros.cfg]" $path/printer.cfg sed -i "1 i [include kiauh_macros.cfg]" $path/printer.cfg
ok_msg "$path/kiauh_macros.cfg created!"
fi fi
done done
### handle single printer.cfg ### handle single printer.cfg
elif [ -f $klipper_cfg_loc/printer.cfg ] && [ ! -f $klipper_cfg_loc/kiauh_macros.cfg ]; then elif [ -f $klipper_cfg_loc/printer.cfg ] && [ ! -f $klipper_cfg_loc/kiauh_macros.cfg ]; then
### copy kiauh_macros.cfg to config location ### copy kiauh_macros.cfg to config location
status_msg "Creating macro config file ..."
cp ${SRCDIR}/kiauh/resources/kiauh_macros.cfg $klipper_cfg_loc cp ${SRCDIR}/kiauh/resources/kiauh_macros.cfg $klipper_cfg_loc
ok_msg "$klipper_cfg_loc/kiauh_macros.cfg created!"
### write the include to the very first line of the printer.cfg ### write the include to the very first line of the printer.cfg
sed -i "1 i [include kiauh_macros.cfg]" $klipper_cfg_loc/printer.cfg sed -i "1 i [include kiauh_macros.cfg]" $klipper_cfg_loc/printer.cfg
ok_msg "$klipper_cfg_loc/kiauh_macros.cfg created!"
fi fi
### restart klipper service to parse the modified printer.cfg ### restart klipper service to parse the modified printer.cfg
klipper_service "restart" klipper_service "restart"