scripts: Fix flash linux when OUT argument provided (#6133)
Signed-off-by: Ilya Vislotsky <write2ilya@gmail.com>
This commit is contained in:
parent
e5ed245ff2
commit
8850084fcf
|
@ -7,10 +7,17 @@ if [ "$EUID" -ne 0 ]; then
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Setting build output directory
|
||||||
|
if [ -z "${1}" ]; then
|
||||||
|
out='out'
|
||||||
|
else
|
||||||
|
out=${1}
|
||||||
|
fi
|
||||||
|
|
||||||
# Install new micro-controller code
|
# Install new micro-controller code
|
||||||
echo "Installing micro-controller code to /usr/local/bin/"
|
echo "Installing micro-controller code to /usr/local/bin/"
|
||||||
rm -f /usr/local/bin/klipper_mcu
|
rm -f /usr/local/bin/klipper_mcu
|
||||||
cp out/klipper.elf /usr/local/bin/klipper_mcu
|
cp ${out}/klipper.elf /usr/local/bin/klipper_mcu
|
||||||
sync
|
sync
|
||||||
|
|
||||||
# Restart (if system install script present)
|
# Restart (if system install script present)
|
||||||
|
|
|
@ -11,4 +11,4 @@ CFLAGS_klipper.elf += -lutil -lrt -lpthread
|
||||||
|
|
||||||
flash: $(OUT)klipper.elf
|
flash: $(OUT)klipper.elf
|
||||||
@echo " Flashing"
|
@echo " Flashing"
|
||||||
$(Q)sudo ./scripts/flash-linux.sh
|
$(Q)sudo ./scripts/flash-linux.sh $(OUT)
|
||||||
|
|
Loading…
Reference in New Issue