From 39f8a983cae7bc6312875105ec3e7ff56d9bd1bb Mon Sep 17 00:00:00 2001 From: vv01f Date: Mon, 13 Apr 2020 12:48:50 +0200 Subject: [PATCH] add commit for resulting data --- create-geojson.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/create-geojson.sh b/create-geojson.sh index ae3bd07..6444a5c 100755 --- a/create-geojson.sh +++ b/create-geojson.sh @@ -6,7 +6,16 @@ for file in *.csv ; do echo "file exists: ${out}, skipping." continue fi - echo ./lookup.py "${file}" - ./lookup.py "${file}" > "${out}" - #~ ./lookup.py "${file}" 2>/dev/null > "${out}" + #~ echo ./lookup.py "${file}" + #~ ./lookup.py "${file}" > "${out}" + + fs=$(stat -t "${out}" |cut -d" " -f2) + data="vebit-geojson/" + + if test $fs -gt 0 -a -d "$data" ; then + cp -f "${out}" "$data" + cd "$data" + git commit "${out}" -m "update file" && git push + fi + done