lib/Tools/update_header
changeset 62446 5b749c31eb97
parent 58872 f0f623005324
child 62589 b5783412bfed
--- a/lib/Tools/update_header	Sun Feb 28 15:00:17 2016 +0100
+++ b/lib/Tools/update_header	Sun Feb 28 15:12:24 2016 +0100
@@ -4,57 +4,6 @@
 #
 # DESCRIPTION: replace obsolete theory header command
 
-
-## diagnostics
-
-PRG="$(basename "$0")"
-
-function usage()
-{
-  echo
-  echo "Usage: isabelle $PRG [FILES|DIRS...]"
-  echo
-  echo "  Options are:"
-  echo "    -s COMMAND   alternative heading command (default 'section')"
-  echo
-  echo "  Recursively find .thy files and replace obsolete theory header commands"
-  echo "  by 'section' (default), or 'chapter', 'subsection', 'subsubsection'."
-  echo
-  echo "  Old versions of files are preserved by appending \"~~\"."
-  echo
-  exit 1
-}
-
-
-## process command line
-
-#options
+isabelle_admin_build jars || exit $?
 
-SECTION="section"
-
-while getopts "s:" OPT
-do
-  case "$OPT" in
-    s)
-      SECTION="$OPTARG"
-      ;;
-    \?)
-      usage
-      ;;
-  esac
-done
-
-shift $(($OPTIND - 1))
-
-
-# args
-
-[ "$#" -eq 0 -o "$1" = "-?" ] && usage
-
-SPECS="$@"; shift "$#"
-
-
-## main
-
-find $SPECS -name \*.thy -print0 | \
-  xargs -0 "$ISABELLE_TOOL" java isabelle.Update_Header "$SECTION"
+"$ISABELLE_TOOL" java isabelle.Update_Header "$@"