diff --git a/scripts/generate_git_version.sh b/scripts/generate_git_version.sh index 49e07a0..12c67d0 100644 --- a/scripts/generate_git_version.sh +++ b/scripts/generate_git_version.sh @@ -1,5 +1,9 @@ INC_DIR=$1 +# Go to the directory where the script is +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +cd "$SCRIPT_DIR" + GIT_VERSION=$(git describe --always --tags --long) echo "#define SEQWISH_GIT_VERSION" \"$GIT_VERSION\" > $1/seqwish_git_version.hpp.tmp