# HG changeset patch # User kleing # Date 1621223839 -36000 # Node ID ac07f6be27eae7481ca87d23f3caf56bd69d2f82 # Parent 7c7a59b765287878b7f321782465dd851645997b avoid unexpected output+behaviour when CDPATH is set diff -r 7c7a59b76528 -r ac07f6be27ea Admin/Isabelle_app/build --- a/Admin/Isabelle_app/build Sun May 16 19:37:15 2021 +0200 +++ b/Admin/Isabelle_app/build Mon May 17 13:57:19 2021 +1000 @@ -2,6 +2,7 @@ set -e +unset CDPATH THIS="$(cd "$(dirname "$0")"; pwd)" cd "$THIS" diff -r 7c7a59b76528 -r ac07f6be27ea Admin/bash_process/build --- a/Admin/bash_process/build Sun May 16 19:37:15 2021 +0200 +++ b/Admin/bash_process/build Mon May 17 13:57:19 2021 +1000 @@ -2,6 +2,7 @@ # # Multi-platform build script +unset CDPATH THIS="$(cd "$(dirname "$0")"; pwd)" PRG="$(basename "$0")" diff -r 7c7a59b76528 -r ac07f6be27ea Admin/build --- a/Admin/build Sun May 16 19:37:15 2021 +0200 +++ b/Admin/build Mon May 17 13:57:19 2021 +1000 @@ -5,6 +5,7 @@ ## directory layout if [ -z "$ISABELLE_HOME" ]; then + unset CDPATH ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)" ISABELLE_TOOL="$ISABELLE_HOME/bin/isabelle" fi diff -r 7c7a59b76528 -r ac07f6be27ea Admin/build_history --- a/Admin/build_history Sun May 16 19:37:15 2021 +0200 +++ b/Admin/build_history Mon May 17 13:57:19 2021 +1000 @@ -2,6 +2,7 @@ # # DESCRIPTION: build history versions from another repository clone +unset CDPATH THIS="$(cd "$(dirname "$0")"; pwd)" "$THIS/build" jars > /dev/null || exit $? diff -r 7c7a59b76528 -r ac07f6be27ea Admin/build_release --- a/Admin/build_release Sun May 16 19:37:15 2021 +0200 +++ b/Admin/build_release Mon May 17 13:57:19 2021 +1000 @@ -2,6 +2,7 @@ # # DESCRIPTION: build full Isabelle distribution from repository +unset CDPATH THIS="$(cd "$(dirname "$0")"; pwd)" "$THIS/build" jars || exit $? diff -r 7c7a59b76528 -r ac07f6be27ea Admin/cronjob/main --- a/Admin/cronjob/main Sun May 16 19:37:15 2021 +0200 +++ b/Admin/cronjob/main Mon May 17 13:57:19 2021 +1000 @@ -2,6 +2,7 @@ # # DESCRIPTION: start the main Isabelle cronjob +unset CDPATH THIS="$(cd "$(dirname "$0")"; pwd)" source "$HOME/.bashrc" diff -r 7c7a59b76528 -r ac07f6be27ea Admin/init --- a/Admin/init Sun May 16 19:37:15 2021 +0200 +++ b/Admin/init Mon May 17 13:57:19 2021 +1000 @@ -7,6 +7,7 @@ ## environment +unset CDPATH export ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)" ISABELLE_REPOS="https://isabelle.sketis.net/repos/isabelle" diff -r 7c7a59b76528 -r ac07f6be27ea bin/isabelle --- a/bin/isabelle Sun May 16 19:37:15 2021 +0200 +++ b/bin/isabelle Mon May 17 13:57:19 2021 +1000 @@ -4,6 +4,8 @@ # # Isabelle tool wrapper. +unset CDPATH + if [ -L "$0" ]; then TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')" exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@" diff -r 7c7a59b76528 -r ac07f6be27ea bin/isabelle_java --- a/bin/isabelle_java Sun May 16 19:37:15 2021 +0200 +++ b/bin/isabelle_java Mon May 17 13:57:19 2021 +1000 @@ -4,6 +4,8 @@ # # Isabelle/Java cold start -- without settings environment +unset CDPATH + if [ -L "$0" ]; then TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')" exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@" diff -r 7c7a59b76528 -r ac07f6be27ea bin/isabelle_scala_script --- a/bin/isabelle_scala_script Sun May 16 19:37:15 2021 +0200 +++ b/bin/isabelle_scala_script Mon May 17 13:57:19 2021 +1000 @@ -4,6 +4,8 @@ # # Isabelle/Scala script wrapper. +unset CDPATH + if [ -L "$0" ]; then TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')" exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@" diff -r 7c7a59b76528 -r ac07f6be27ea src/Tools/Metis/fix_metis_license --- a/src/Tools/Metis/fix_metis_license Sun May 16 19:37:15 2021 +0200 +++ b/src/Tools/Metis/fix_metis_license Mon May 17 13:57:19 2021 +1000 @@ -1,4 +1,5 @@ #!/usr/bin/env bash +unset CDPATH THIS=$(cd "$(dirname "$0")"; echo $PWD) (cd $THIS; perl -p -i~ -w -e 's/MIT license/BSD License/g' Makefile src/*.s* scripts/mlpp) diff -r 7c7a59b76528 -r ac07f6be27ea src/Tools/Metis/make_metis --- a/src/Tools/Metis/make_metis Sun May 16 19:37:15 2021 +0200 +++ b/src/Tools/Metis/make_metis Mon May 17 13:57:19 2021 +1000 @@ -6,6 +6,7 @@ # A few other ad hoc transformations are performed to ensure that the sources # compile within Isabelle on Poly/ML and SML/NJ. +unset CDPATH THIS=$(cd "$(dirname "$0")"; echo $PWD) make -f Makefile.FILES refresh_FILES FILES=$(cat "$THIS/FILES")