lib/Tools/findlogics
author wenzelm
Sat, 24 Nov 2001 16:54:32 +0100
changeset 12282 f98beaaa7c4f
parent 10555 2323ec838401
child 14981 e73f8140af78
permissions -rwxr-xr-x
generic_merge;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10555
2323ec838401 /usr/bin/env bash;
wenzelm
parents: 9788
diff changeset
     1
#!/usr/bin/env bash
2333
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
     2
#
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
     3
# $Id$
9788
wenzelm
parents: 3007
diff changeset
     4
# Author: Markus Wenzel, TU Muenchen
wenzelm
parents: 3007
diff changeset
     5
# License: GPL (GNU GENERAL PUBLIC LICENSE)
2333
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
     6
#
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
     7
# DESCRIPTION: collect heap names from ISABELLE_PATH
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
     8
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
     9
9788
wenzelm
parents: 3007
diff changeset
    10
PRG=$(basename "$0")
2333
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    11
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    12
function usage()
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    13
{
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    14
  echo
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    15
  echo "Usage: $PRG"
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    16
  echo
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    17
  echo "  Collect heap file names from ISABELLE_PATH."
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    18
  echo
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    19
  exit 1
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    20
}
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    21
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    22
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    23
## main
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    24
9788
wenzelm
parents: 3007
diff changeset
    25
[ "$#" -ne 0 ] && usage
2333
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    26
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    27
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    28
LOGICS=""
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    29
9788
wenzelm
parents: 3007
diff changeset
    30
ORIG_IFS="$IFS"
wenzelm
parents: 3007
diff changeset
    31
IFS=":"
wenzelm
parents: 3007
diff changeset
    32
for DIR in $ISABELLE_PATH
2333
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    33
do
9788
wenzelm
parents: 3007
diff changeset
    34
  DIR="$DIR/$ML_IDENTIFIER"
wenzelm
parents: 3007
diff changeset
    35
  for FILE in "$DIR"/*
2333
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    36
  do
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    37
    if [ -f "$FILE" ]; then
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    38
      NAME=$(basename "$FILE")
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    39
      LOGICS="$LOGICS $NAME"
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    40
    fi
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    41
  done
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    42
done
9788
wenzelm
parents: 3007
diff changeset
    43
IFS="$ORIG_IFS"
2333
f1159f38ba4f findlogics: collect heap names from ISABELLE_PATH;
wenzelm
parents:
diff changeset
    44
9788
wenzelm
parents: 3007
diff changeset
    45
echo $({ for L in $LOGICS; do echo "$L"; done; } | sort | uniq)