refactor(switch_klipper_repo.sh): improve error message

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-05-14 13:19:41 +02:00
parent 3f9d4cc256
commit 322d18e7ae

View File

@@ -13,10 +13,10 @@ set -e
function change_klipper_repo_menu(){
local repo_file="${SRCDIR}/kiauh/klipper_repos.txt"
local repos=() branches=()
local repo branch repos=() branches=()
if [ ! -f "${repo_file}" ]; then
print_error "File 'klipper_repos.txt' in ${SRCDIR}/kiauh not found!"
if [[ ! -f ${repo_file} ]]; then
print_error "File not found:\n '${SRCDIR}/kiauh/klipper_repos.txt'"
return
fi