From 316d6821fa0da2f9c89f0e5b58c539318c49f7c0 Mon Sep 17 00:00:00 2001 From: vv01f Date: Fri, 15 Nov 2019 22:35:44 +0100 Subject: [PATCH] fix all hints of shellcheck.net linter --- create-geojson.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/create-geojson.sh b/create-geojson.sh index 2b8a0f9..a8e0321 100755 --- a/create-geojson.sh +++ b/create-geojson.sh @@ -1,8 +1,11 @@ #!/usr/bin/env sh echo "this takes some time depending on the amount of addresses in your lists …" -for file in $(ls *-csv) ; do - out=$(echo ${file}|cut -d- -f1)".geojson" - test -e ${out} && { echo "file exists: "${out}", skipping."; continue; } - echo ./lookup.py ${file} - ./lookup.py ${file} 2>/dev/null > ${out} +for file in *-csv ; do + out=$(echo "${file}"|cut -d- -f1)".geojson" + if test -e "${out}" ; do + echo "file exists: ${out}, skipping." + continue + fi + echo ./lookup.py "${file}" + ./lookup.py "${file}" 2>/dev/null > "${out}" done