proper treatment of directory links;
authorwenzelm
Tue May 17 09:58:40 2005 +0200 (2005-05-17)
changeset 15967f9163c6f69d6
parent 15966 73cf5ef8ed20
child 15968 c4e8a6af2235
proper treatment of directory links;
tuned;
bin/isabelle
bin/isabelle-interface
bin/isabelle-process
bin/isatool
build
     1.1 --- a/bin/isabelle	Tue May 17 01:24:19 2005 +0200
     1.2 +++ b/bin/isabelle	Tue May 17 09:58:40 2005 +0200
     1.3 @@ -7,10 +7,10 @@
     1.4  
     1.5  if [ -L "$0" ]; then
     1.6    TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
     1.7 -  exec "$(cd "$(dirname "$0")"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
     1.8 +  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
     1.9  fi
    1.10  
    1.11 -THIS=$(cd "$(dirname "$0")"; pwd)
    1.12 +THIS=$(cd "$(dirname "$0")"; pwd -P)
    1.13  NAME="$(basename "$0")"
    1.14  
    1.15  case "$NAME" in
     2.1 --- a/bin/isabelle-interface	Tue May 17 01:24:19 2005 +0200
     2.2 +++ b/bin/isabelle-interface	Tue May 17 09:58:40 2005 +0200
     2.3 @@ -7,7 +7,7 @@
     2.4  
     2.5  if [ -L "$0" ]; then
     2.6    TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
     2.7 -  exec "$(cd "$(dirname "$0")"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
     2.8 +  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
     2.9  fi
    2.10  
    2.11  
    2.12 @@ -15,9 +15,8 @@
    2.13  
    2.14  PRG="$(basename "$0")"
    2.15  
    2.16 -ISABELLE_HOME="$(dirname "$0")/.."
    2.17 -. "$ISABELLE_HOME/lib/scripts/getsettings" || \
    2.18 -  { echo "$PRG probably not called from its original place!"; exit 2; }
    2.19 +ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
    2.20 +source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2
    2.21  
    2.22  
    2.23  ## diagnostics
     3.1 --- a/bin/isabelle-process	Tue May 17 01:24:19 2005 +0200
     3.2 +++ b/bin/isabelle-process	Tue May 17 09:58:40 2005 +0200
     3.3 @@ -7,7 +7,7 @@
     3.4  
     3.5  if [ -L "$0" ]; then
     3.6    TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
     3.7 -  exec "$(cd "$(dirname "$0")"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
     3.8 +  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
     3.9  fi
    3.10  
    3.11  
    3.12 @@ -15,9 +15,8 @@
    3.13  
    3.14  PRG="$(basename "$0")"
    3.15  
    3.16 -ISABELLE_HOME="$(dirname "$0")/.."
    3.17 -. "$ISABELLE_HOME/lib/scripts/getsettings" || \
    3.18 -  { echo "$PRG probably not called from its original place!"; exit 2; }
    3.19 +ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
    3.20 +source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2
    3.21  
    3.22  
    3.23  ## diagnostics
     4.1 --- a/bin/isatool	Tue May 17 01:24:19 2005 +0200
     4.2 +++ b/bin/isatool	Tue May 17 09:58:40 2005 +0200
     4.3 @@ -3,12 +3,11 @@
     4.4  # $Id$
     4.5  # Author: Markus Wenzel, TU Muenchen
     4.6  #
     4.7 -# Isabelle tool starter -- provides settings environment
     4.8 -# and keeps your PATH name space clean.
     4.9 +# Isabelle tool starter.
    4.10  
    4.11  if [ -L "$0" ]; then
    4.12    TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
    4.13 -  exec "$(cd "$(dirname "$0")"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
    4.14 +  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
    4.15  fi
    4.16  
    4.17  
    4.18 @@ -16,9 +15,8 @@
    4.19  
    4.20  PRG="$(basename "$0")"
    4.21  
    4.22 -ISABELLE_HOME="$(dirname "$0")/.."
    4.23 -. "$ISABELLE_HOME/lib/scripts/getsettings" || \
    4.24 -  { echo "$PRG probably not called from its original place!"; exit 2; }
    4.25 +ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
    4.26 +source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2
    4.27  
    4.28  
    4.29  ## diagnostics
    4.30 @@ -38,7 +36,6 @@
    4.31      for DIR in $ISABELLE_TOOLS
    4.32      do
    4.33        cd "$DIR"
    4.34 -      echo
    4.35        for T in *
    4.36        do
    4.37          if [ -f "$T" -a -x "$T" ]; then
    4.38 @@ -49,7 +46,6 @@
    4.39      done
    4.40      IFS="$ORIG_IFS"
    4.41    )
    4.42 -  echo
    4.43    exit 1
    4.44  }
    4.45  
     5.1 --- a/build	Tue May 17 01:24:19 2005 +0200
     5.2 +++ b/build	Tue May 17 09:58:40 2005 +0200
     5.3 @@ -7,7 +7,7 @@
     5.4  
     5.5  if [ -L "$0" ]; then
     5.6    TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
     5.7 -  exec "$(cd "$(dirname "$0")"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
     5.8 +  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
     5.9  fi
    5.10  
    5.11  
    5.12 @@ -18,13 +18,12 @@
    5.13  
    5.14  ## settings
    5.15  
    5.16 -PRG="$(basename "$0")"
    5.17 -
    5.18  export THIS_IS_ISABELLE_BUILD=true
    5.19  
    5.20 -ISABELLE_HOME="$(dirname "$0")"
    5.21 -. "$ISABELLE_HOME/lib/scripts/getsettings" || \
    5.22 -  { echo "$PRG probably not called from its original place!"; exit 2; }
    5.23 +PRG="$(basename "$0")"
    5.24 +
    5.25 +ISABELLE_HOME="$(cd "$(dirname "$0")"; pwd -P)"
    5.26 +source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2
    5.27  
    5.28  
    5.29  ## diagnostics