From d4f36724048884d87a46f422aeaf7a45d5e09f11 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 21 Aug 2015 18:11:41 -0400 Subject: [PATCH] changes needed since cygwin is somehow getting a different interpretation of the pwd from someplace. perhaps from our own version in feisty? anyhow, this just fixates the call against default pwd location, but a better approach would not need the absolute path. --- customizing/fred/refred.sh | 2 +- examples/bashisms/script_location.sh | 2 +- scripts/core/bootstrap_shells.sh | 6 ++++-- scripts/generator/bootstrap_build.sh | 2 +- scripts/rev_control/version_control.sh | 2 +- scripts/shunit/example_shunit_test.sh | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/customizing/fred/refred.sh b/customizing/fred/refred.sh index 644aa76a..06faf847 100644 --- a/customizing/fred/refred.sh +++ b/customizing/fred/refred.sh @@ -10,7 +10,7 @@ function refred() # this block should execute when the script is actually run, rather # than when it's just being sourced. if [[ $0 =~ .*refred\.sh.* ]]; then - THISDIR="$( \cd "$(\dirname "$0")" && \pwd )" + THISDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )" export LIGHTWEIGHT_INIT=true source "$THISDIR/../../scripts/core/launch_feisty_meow.sh" refred diff --git a/examples/bashisms/script_location.sh b/examples/bashisms/script_location.sh index bdae0fc7..a01dc95a 100644 --- a/examples/bashisms/script_location.sh +++ b/examples/bashisms/script_location.sh @@ -3,5 +3,5 @@ # work properly in a bash script that is included via 'source' or '.'. # the first letter of each command is escaped to eliminate the danger of # personal aliases or functions disrupting the results. -ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && \pwd )" +ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )" diff --git a/scripts/core/bootstrap_shells.sh b/scripts/core/bootstrap_shells.sh index fd86f50e..0b3e9975 100644 --- a/scripts/core/bootstrap_shells.sh +++ b/scripts/core/bootstrap_shells.sh @@ -9,7 +9,7 @@ # startup. that can be added manually by editing your .bashrc file. # read the examples/feisty_meow_startup/bashrc_user file for more details. -ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && \pwd )" +ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )" CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )" THIS_TOOL_NAME="$(basename "$0")" @@ -17,7 +17,9 @@ THIS_TOOL_NAME="$(basename "$0")" pushd "$CORE_SCRIPTS_DIR/../.." &>/dev/null source "$CORE_SCRIPTS_DIR/functions.sh" -export FEISTY_MEOW_DIR="$(\pwd)" +#echo originating folder is $ORIGINATING_FOLDER +export FEISTY_MEOW_DIR="$(/bin/pwd)" +#echo feisty now is FEISTY_MEOW_DIR=$FEISTY_MEOW_DIR # repetitive bit stolen from variables. should make a file out of this somehow. IS_DOS=$(uname | grep -i ming) diff --git a/scripts/generator/bootstrap_build.sh b/scripts/generator/bootstrap_build.sh index 4e074a60..fba2df43 100644 --- a/scripts/generator/bootstrap_build.sh +++ b/scripts/generator/bootstrap_build.sh @@ -30,7 +30,7 @@ export PATH=/bin:$PATH export INCLUDED_FROM_BOOTSTRAP=true # pull in our build variables using the path to this script. -export BUILD_SCRIPTS_DIR="$( \cd "$(\dirname "$0")" && \pwd )" +export BUILD_SCRIPTS_DIR="$( \cd "$(\dirname "$0")" && /bin/pwd )" #echo build scripts dir initial value: $BUILD_SCRIPTS_DIR BUILD_SCRIPTS_DIR="$(echo $BUILD_SCRIPTS_DIR | tr '\\\\' '/' )" #echo build scripts dir after chewing: $BUILD_SCRIPTS_DIR diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index d1b892e0..f76f3301 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -256,7 +256,7 @@ function generate_rev_ctrl_filelist() { local dir="$1"; shift pushd "$dir" &>/dev/null - local dirhere="$( \cd "$(\dirname "$dir")" && \pwd )" + local dirhere="$( \cd "$(\dirname "$dir")" && /bin/pwd )" local tempfile=$(mktemp /tmp/zz_rev_checkin.XXXXXX) echo >$tempfile find $dirhere -follow -maxdepth 5 -type d -iname ".svn" -exec echo {}/.. ';' >>$tempfile 2>/dev/null diff --git a/scripts/shunit/example_shunit_test.sh b/scripts/shunit/example_shunit_test.sh index 9d389bee..ce84616c 100755 --- a/scripts/shunit/example_shunit_test.sh +++ b/scripts/shunit/example_shunit_test.sh @@ -5,7 +5,7 @@ # Author: Chris Koeritz # license gnu gpl v3 -export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. +export WORKDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )" # obtain the script's working directory. if [[ ! "$0" =~ ^/.* ]]; then # re-run the script with an absolute path if it didn't start out that way; otherwise, # shunit is not happy with finding the script. -- 2.34.1