diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2017-01-15 00:16:52 +0100 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2017-01-15 00:16:52 +0100 |
commit | 5124b1beb897c57557fe8b61f41cc086bec6925f (patch) | |
tree | 401be6b10ebcf0e76efc45c5fc797b5ad11121f4 /runkml | |
parent | 473fb4add901dad27a9907ad8a3f7bae0d33b319 (diff) |
Move code to create KML files to runkml.
Diffstat (limited to 'runkml')
-rwxr-xr-x | runkml | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#!/bin/sh + +basedir="$(cd $(dirname $0); pwd)" + +set -e + +if [ ! -d kml-data ]; then mkdir kml-data ; fi + +for harfile in "$@" ; do + filename=$(basename $harfile .har) + kmlfile="kml-data/$filename.kml" + if $basedir/har2kml "$harfile" > $kmlfile.new ; then + mv $kmlfile.new $kmlfile + else + rm $kmlfile.new + fi +done |