diff options
| author | tgrogers <[email protected]> | 2019-08-28 13:02:33 -0400 |
|---|---|---|
| committer | tgrogers <[email protected]> | 2019-08-28 13:02:33 -0400 |
| commit | 208654625cf668978d249359fcb85b1f7edd13dd (patch) | |
| tree | e2e355fce44206e0938ed80769e8ff1cc1a148ab | |
| parent | 403a5e7e77641f3c95bc26e29199b3a27fbf8f98 (diff) | |
Fixing the screwy way that setup env messes with the cd stack
| -rw-r--r-- | setup_environment | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/setup_environment b/setup_environment index 58f4713..ca60d6b 100644 --- a/setup_environment +++ b/setup_environment @@ -7,13 +7,10 @@ export GPGPUSIM_ROOT="$( cd "$( dirname "$BASH_SOURCE" )" && pwd )" GPGPUSIM_VERSION_STRING=`cat $GPGPUSIM_ROOT/version | awk '/Version/ {print $8}'` #Detect Git branch and commit # -CURRENT_PWD=`pwd` -cd $GPGPUSIM_ROOT -GIT_COMMIT=`git log -n 1 | head -1 | sed -re 's/commit (.*)/\1/'` -GIT_FILES_CHANGED=`git diff --numstat | wc | sed -re 's/^\s+([0-9]+).*/\1./'` -GIT_FILES_CHANGED+=`git diff --numstat --cached | wc | sed -re 's/^\s+([0-9]+).*/\1/'` +GIT_COMMIT=`git --git-dir=$GPGPUSIM_ROOT/.git log -n 1 | head -1 | sed -re 's/commit (.*)/\1/'` +GIT_FILES_CHANGED=`git --git-dir=$GPGPUSIM_ROOT/.git diff --numstat | wc | sed -re 's/^\s+([0-9]+).*/\1./'` +GIT_FILES_CHANGED+=`git --git-dir=$GPGPUSIM_ROOT/.git diff --numstat --cached | wc | sed -re 's/^\s+([0-9]+).*/\1/'` GPGPUSIM_BUILD_STRING="gpgpu-sim_git-commit-$GIT_COMMIT-modified_$GIT_FILES_CHANGED" -cd $CURRENT_PWD echo -n "GPGPU-Sim version $GPGPUSIM_VERSION_STRING (build $GPGPUSIM_BUILD_STRING) "; |
