lib/Tools/findlogics
changeset 32322 45cb4a86eca2
parent 29143 72c960b2b83e
child 32390 468eff174a77
     1.1 --- a/lib/Tools/findlogics	Tue Aug 04 13:35:33 2009 +0200
     1.2 +++ b/lib/Tools/findlogics	Tue Aug 04 15:05:34 2009 +0200
     1.3 @@ -22,22 +22,21 @@
     1.4  
     1.5  [ "$#" -ne 0 ] && usage
     1.6  
     1.7 -
     1.8 -LOGICS=""
     1.9 +declare -a LOGICS=()
    1.10 +declare -a ISABELLE_PATHS=()
    1.11  
    1.12 -ORIG_IFS="$IFS"
    1.13 -IFS=":"
    1.14 -for DIR in $ISABELLE_PATH
    1.15 +ORIG_IFS="$IFS"; IFS=":"; ISABELLE_PATHS=($ISABELLE_PATH); IFS=$ORIG_IFS
    1.16 +
    1.17 +for DIR in "${ISABELLE_PATHS[@]}"
    1.18  do
    1.19    DIR="$DIR/$ML_IDENTIFIER"
    1.20    for FILE in "$DIR"/*
    1.21    do
    1.22      if [ -f "$FILE" ]; then
    1.23        NAME=$(basename "$FILE")
    1.24 -      LOGICS="$LOGICS $NAME"
    1.25 +      LOGICS+=("$NAME")
    1.26      fi
    1.27    done
    1.28  done
    1.29 -IFS="$ORIG_IFS"
    1.30  
    1.31 -echo $({ for L in $LOGICS; do echo "$L"; done; } | sort | uniq)
    1.32 +echo $({ for L in ${LOGICS[@]}; do echo "$L"; done; } | sort | uniq)