ptanov

update-map.sh

Jun 5th, 2020
88
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. set -e
  4.  
  5. mapFile="${2:-map.html}"
  6.  
  7. cp viewer.html map.html
  8. echo '<script id="gpsdata" type="text/xmldata">' >> "${mapFile}"
  9. # remove <?xml header
  10. tail -n +2 "${1:-out.gpx}" >> "${mapFile}"
  11. echo '</script>' >> "${mapFile}"
RAW Paste Data