summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-13 20:57:09 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-13 20:57:09 (EDT)
commitb72744841fda75200ed72ede41d869e83a9972ce (patch)
treeaba269508121993fd44e24ad7bf14fa7d3ded60a
parent73b72fbb3740d3b87c191f43cf113a6b1c774525 (diff)
main(): Improve in-place detection
-rw-r--r--src/main.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.sh b/src/main.sh
index f8b4cc5..2fbbdbf 100644
--- a/src/main.sh
+++ b/src/main.sh
@@ -46,9 +46,9 @@ main()
local cmd=
local status=
- if [ -f "${0%/*}/.builddirstamp" ]; then
+ if [ -f "$(dirname "${0}")/.builddirstamp" ]; then
in_place=true
- builddir="${0%/*}"
+ builddir="$(dirname "${0}")"
else
in_place=false
builddir=''