diff --git a/README.md b/README.md index 698a5c6..b609b9c 100644 --- a/README.md +++ b/README.md @@ -20,5 +20,5 @@ cd ~ git clone https://github.com/Klipper3d/klipper cd klipper make menuconfig -../klipper-builder/build-klipper.sh . +../klipper-builder/build-klipper.sh ``` diff --git a/build-klipper.sh b/build-klipper.sh index 4304762..efd368c 100755 --- a/build-klipper.sh +++ b/build-klipper.sh @@ -1,13 +1,18 @@ #!/bin/bash # Check if an argument is provided -if [ $# -ne 1 ]; then +if [ $# -gt 1 ]; then echo "Usage: $0 " exit 1 fi +if [ $# -eq 0 ]; then + KLIPPER_DIRECTORY=. +else + KLIPPER_DIRECTORY=$1 +fi + # Check if the directory exists -KLIPPER_DIRECTORY=$1 if [ ! -d "${KLIPPER_DIRECTORY}" ]; then echo "Error: Directory '${KLIPPER_DIRECTORY}' does not exist." exit 1