From 4c963de0fc6b3e44dd6267633e1a2c5294a3c826 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Fri, 21 Oct 2022 19:13:53 -0400 Subject: [PATCH] data-path-fix: add gcode path option Signed-off-by: Eric Callahan --- scripts/data-path-fix.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/data-path-fix.sh b/scripts/data-path-fix.sh index fa36383..1998482 100755 --- a/scripts/data-path-fix.sh +++ b/scripts/data-path-fix.sh @@ -13,7 +13,7 @@ MOONRAKER_LOG="${LOG_PATH}/moonraker.log" ALIAS="moonraker" # Parse command line arguments -while getopts "c:l:d:a:m:" arg; do +while getopts "c:l:d:a:m:g:" arg; do case $arg in c) MOONRAKER_CONF=$OPTARG @@ -35,6 +35,10 @@ while getopts "c:l:d:a:m:" arg; do DB_PATH=$OPTARG [ ! -f "${DB_PATH}/data.mdb" ] && echo "No valid database found at ${DB_PATH}" && exit 1 ;; + g) + GCODE_PATH=$OPTARG + [ ! -d "${GCODE_PATH}" ] && echo "No GCode Path found at ${GCODE_PATH}" && exit 1 + ;; esac done