--- a/lib/Tools/findlogics Tue Aug 04 13:35:33 2009 +0200
+++ b/lib/Tools/findlogics Tue Aug 04 15:05:34 2009 +0200
@@ -22,22 +22,21 @@
[ "$#" -ne 0 ] && usage
-
-LOGICS=""
+declare -a LOGICS=()
+declare -a ISABELLE_PATHS=()
-ORIG_IFS="$IFS"
-IFS=":"
-for DIR in $ISABELLE_PATH
+ORIG_IFS="$IFS"; IFS=":"; ISABELLE_PATHS=($ISABELLE_PATH); IFS=$ORIG_IFS
+
+for DIR in "${ISABELLE_PATHS[@]}"
do
DIR="$DIR/$ML_IDENTIFIER"
for FILE in "$DIR"/*
do
if [ -f "$FILE" ]; then
NAME=$(basename "$FILE")
- LOGICS="$LOGICS $NAME"
+ LOGICS+=("$NAME")
fi
done
done
-IFS="$ORIG_IFS"
-echo $({ for L in $LOGICS; do echo "$L"; done; } | sort | uniq)
+echo $({ for L in ${LOGICS[@]}; do echo "$L"; done; } | sort | uniq)