gpxlint 682 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. xmllint --version 2>/dev/null || { echo "consider $ sudo apt-get install libxml2-utils" && exit 1 ; }
  3. cwd="$(pwd)"
  4. cd "$(dirname "$0")"
  5. script_dir="$(pwd)"
  6. cd "$cwd"
  7. schema="$script_dir/gpx-1.1.xsd"
  8. schema="$script_dir/monuments.rng"
  9. #
  10. # if [ ! -f "$schema" ] ; then
  11. # curl --version >/dev/null || { echo "consider $ sudo apt-get install curl" && exit 1 ; }
  12. # curl --remote-time --output "$schema" --url "http://www.topografix.com/GPX/1/1/gpx.xsd" || { echo "sorry, failed to load GPX schema." && exit 1 ; }
  13. # fi
  14. #
  15. # echo xmllint --schema "$schema" $@ 1>&2
  16. # xmllint --schema "$schema" $@
  17. echo xmllint --relaxng "$schema" $@ 1>&2
  18. xmllint --relaxng "$schema" $@