Revision 1001 trunk/scripts/admb/admb

admb (revision 1001)
11 11
if [[ "$1" == "-help" ]]; then help; exit; fi
12 12
if [[ "$1" == "--help" ]]; then help; exit; fi
13 13

  
14
if [ ! -z $ADMB_HOME ]; then
14
if [ ! -z "$ADMB_HOME" ]; then
15 15
unset ADMB_HOME
16 16
fi
17 17

  
18 18
FILE=$0
19 19
DIRECTORY=$(cd `dirname $FILE` && pwd)
20
while [ -h ${FILE} ]; do 
20
while [ -h "${FILE}" ]; do 
21 21
  pushd $DIRECTORY &> /dev/null
22 22
  FILE=$(readlink $DIRECTORY/admb)
23 23
  DIRECTORY=$(cd `dirname $FILE` && pwd)
24 24
  popd &> /dev/null
25 25
done
26
pushd $DIRECTORY/.. &> /dev/null
26
pushd "$DIRECTORY/.." &> /dev/null
27 27
declare -rx ADMB_HOME="$PWD"
28 28
popd &> /dev/null
29 29
PATH=$ADMB_HOME/bin:$PATH

Also available in: Unified diff