lib/Tools/yxml
author wenzelm
Sun Feb 07 19:54:12 2010 +0100 (2010-02-07)
changeset 35022 c844b93dd147
parent 29143 72c960b2b83e
permissions -rwxr-xr-x
modernized perl scripts: prefer standalone executables;
wenzelm@26575
     1
#!/usr/bin/env bash
wenzelm@26575
     2
#
wenzelm@26575
     3
# Author: Makarius
wenzelm@26575
     4
#
wenzelm@26575
     5
# DESCRIPTION: simple XML to YXML converter
wenzelm@26575
     6
wenzelm@26575
     7
wenzelm@26575
     8
PRG="$(basename "$0")"
wenzelm@26575
     9
wenzelm@26575
    10
function usage()
wenzelm@26575
    11
{
wenzelm@26575
    12
  echo
wenzelm@28650
    13
  echo "Usage: isabelle $PRG"
wenzelm@26575
    14
  echo
wenzelm@26575
    15
  echo "  Convert XML (stdin) to YXML (stdout)."
wenzelm@26575
    16
  echo
wenzelm@26575
    17
  exit 1
wenzelm@26575
    18
}
wenzelm@26575
    19
wenzelm@26575
    20
function fail()
wenzelm@26575
    21
{
wenzelm@26575
    22
  echo "$1" >&2
wenzelm@26575
    23
  exit 2
wenzelm@26575
    24
}
wenzelm@26575
    25
wenzelm@26575
    26
wenzelm@26575
    27
## process command line
wenzelm@26575
    28
wenzelm@26575
    29
[ "$#" -ne 0 ] && usage
wenzelm@26575
    30
wenzelm@26575
    31
wenzelm@26575
    32
## main
wenzelm@26575
    33
wenzelm@35022
    34
exec "$ISABELLE_HOME/lib/scripts/yxml"