From 67790fdb2cf7c5de421c69b2c7df66765e8f4f5d Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 10 May 2023 10:54:45 -0400 Subject: [PATCH] Use a better script path detection method --- apply.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apply.sh b/apply.sh index ae677ee..915a6df 100755 --- a/apply.sh +++ b/apply.sh @@ -1,4 +1,4 @@ #!/bin/bash # Always execute in the script's directory -pushd ${0%/*} +pushd "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" find . -name "*.patch" -printf "%h\n" | uniq | xargs -I{} bash -c "cd $(pwd)/../{}; git am $(pwd)/{}/*"