lib/Tools/findlogics
author wenzelm
Sat Jul 25 10:31:27 2009 +0200 (2009-07-25)
changeset 32187 cca43ca13f4f
parent 29143 72c960b2b83e
child 32322 45cb4a86eca2
permissions -rwxr-xr-x
renamed structure Display_Goal to Goal_Display;
wenzelm@10555
     1
#!/usr/bin/env bash
wenzelm@2333
     2
#
wenzelm@9788
     3
# Author: Markus Wenzel, TU Muenchen
wenzelm@2333
     4
#
wenzelm@2333
     5
# DESCRIPTION: collect heap names from ISABELLE_PATH
wenzelm@2333
     6
wenzelm@2333
     7
wenzelm@9788
     8
PRG=$(basename "$0")
wenzelm@2333
     9
wenzelm@2333
    10
function usage()
wenzelm@2333
    11
{
wenzelm@2333
    12
  echo
wenzelm@28650
    13
  echo "Usage: isabelle $PRG"
wenzelm@2333
    14
  echo
wenzelm@2333
    15
  echo "  Collect heap file names from ISABELLE_PATH."
wenzelm@2333
    16
  echo
wenzelm@2333
    17
  exit 1
wenzelm@2333
    18
}
wenzelm@2333
    19
wenzelm@2333
    20
wenzelm@2333
    21
## main
wenzelm@2333
    22
wenzelm@9788
    23
[ "$#" -ne 0 ] && usage
wenzelm@2333
    24
wenzelm@2333
    25
wenzelm@2333
    26
LOGICS=""
wenzelm@2333
    27
wenzelm@9788
    28
ORIG_IFS="$IFS"
wenzelm@9788
    29
IFS=":"
wenzelm@9788
    30
for DIR in $ISABELLE_PATH
wenzelm@2333
    31
do
wenzelm@9788
    32
  DIR="$DIR/$ML_IDENTIFIER"
wenzelm@9788
    33
  for FILE in "$DIR"/*
wenzelm@2333
    34
  do
wenzelm@2333
    35
    if [ -f "$FILE" ]; then
wenzelm@27201
    36
      NAME=$(basename "$FILE")
wenzelm@2333
    37
      LOGICS="$LOGICS $NAME"
wenzelm@2333
    38
    fi
wenzelm@2333
    39
  done
wenzelm@2333
    40
done
wenzelm@9788
    41
IFS="$ORIG_IFS"
wenzelm@2333
    42
wenzelm@9788
    43
echo $({ for L in $LOGICS; do echo "$L"; done; } | sort | uniq)