summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-07-20 21:01:21 -0400
committerMax Rees <maxcrees@me.com>2019-07-20 21:01:21 -0400
commit164e656bacd0526c41f94b670e2c6ac23da35080 (patch)
treea8dde1ab0507098dc10f6e4c5a97785c66d89dc9
parent5ecfc84bc620859a57c8364bda636cbca14c46e6 (diff)
downloadabuild-164e656bacd0526c41f94b670e2c6ac23da35080.tar.gz
abuild-164e656bacd0526c41f94b670e2c6ac23da35080.tar.bz2
abuild-164e656bacd0526c41f94b670e2c6ac23da35080.tar.xz
abuild-164e656bacd0526c41f94b670e2c6ac23da35080.zip
abuild: use case instead of grep for normalize_target_path
-rw-r--r--abuild.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 07b872c..b71578e 100644
--- a/abuild.in
+++ b/abuild.in
@@ -1395,7 +1395,9 @@ scan_shared_objects() {
# path (2nd arg).
normalize_target_path() {
local path=$1
- (printf '%s' "$path" | grep -q '^/') || path=$(dirname "$2")/$path
+ case "$path" in
+ /*) path="$(dirname "$2")/$path";;
+ esac
local oifs="$IFS" pathstr= i=
IFS='/'