| author | mengj | 
| Fri, 28 Oct 2005 02:29:01 +0200 | |
| changeset 18003 | 2aecb2d68c00 | 
| parent 15847 | c05c7670f166 | 
| child 26576 | fc76b7b79ba9 | 
| permissions | -rwxr-xr-x | 
| 10555 | 1 | #!/usr/bin/env bash | 
| 10026 | 2 | # | 
| 3 | # $Id$ | |
| 4 | # Author: Markus Wenzel, TU Muenchen | |
| 5 | # | |
| 6 | # DESCRIPTION: remove unreadable symbol names from sources | |
| 7 | ||
| 8 | ||
| 9 | ## diagnostics | |
| 10 | ||
| 10511 | 11 | PRG="$(basename "$0")" | 
| 10026 | 12 | |
| 13 | function usage() | |
| 14 | {
 | |
| 15 | echo | |
| 16 | echo "Usage: $PRG [FILES|DIRS...]" | |
| 17 | echo | |
| 18 | echo " Recursively find .thy/.ML files, removing unreadable symbol names." | |
| 19 | echo " Note: this is an ad-hoc script; there is no systematic way to replace" | |
| 20 | echo " symbols independently of the inner syntax of a theory!" | |
| 21 | echo | |
| 22 | echo " Renames old versions of FILES by appending \"~~\"." | |
| 23 | echo | |
| 24 | exit 1 | |
| 25 | } | |
| 26 | ||
| 27 | ||
| 28 | ## process command line | |
| 29 | ||
| 30 | [ "$#" -eq 0 -o "$1" = "-?" ] && usage | |
| 31 | ||
| 32 | SPECS="$@"; shift "$#" | |
| 33 | ||
| 34 | ||
| 35 | ## main | |
| 36 | ||
| 37 | #set by configure | |
| 15847 
c05c7670f166
restored AUTO_BASH/PERL -- beware of ./configure!
 wenzelm parents: 
15574diff
changeset | 38 | AUTO_PERL=perl | 
| 10026 | 39 | |
| 40 | find $SPECS \( -name \*.ML -o -name \*.thy \) -print | \ | |
| 41 | xargs "$AUTO_PERL" -w "$ISABELLE_HOME/lib/scripts/unsymbolize.pl" |