lib/Tools/update_semicolons
author wenzelm
Fri Jan 01 16:40:47 2016 +0100 (2016-01-01)
changeset 62028 2ecee4679f99
parent 58861 5ff61774df11
permissions -rwxr-xr-x
updated for release;
     1 #!/usr/bin/env bash
     2 #
     3 # Author: Makarius
     4 #
     5 # DESCRIPTION: remove obsolete semicolons from theory sources
     6 
     7 
     8 ## diagnostics
     9 
    10 PRG="$(basename "$0")"
    11 
    12 function usage()
    13 {
    14   echo
    15   echo "Usage: isabelle $PRG [FILES|DIRS...]"
    16   echo
    17   echo "  Recursively find .thy files and remove obsolete semicolons."
    18   echo
    19   echo "  Old versions of files are preserved by appending \"~~\"."
    20   echo
    21   exit 1
    22 }
    23 
    24 
    25 ## process command line
    26 
    27 [ "$#" -eq 0 -o "$1" = "-?" ] && usage
    28 
    29 SPECS="$@"; shift "$#"
    30 
    31 
    32 ## main
    33 
    34 find $SPECS -name \*.thy -print0 | \
    35   xargs -0 "$ISABELLE_TOOL" java isabelle.Update_Semicolons