summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-10-14 18:43:35 +0200
committerMichael Schroeder <mls@suse.de>2014-10-14 18:43:35 +0200
commitc1860ce9b72f4d661f62f0d838536e26464da84b (patch)
tree782e675a136aa5634dec55a84adacca395b56019
parentc6526b4d1a79ac3acfc99bf29067d73093ee7776 (diff)
strip trailing slash from BUILD_ROOT
Fixes issue #146.
-rwxr-xr-xbuild2
1 files changed, 2 insertions, 0 deletions
diff --git a/build b/build
index 9cfd4c8..9052369 100755
--- a/build
+++ b/build
@@ -594,6 +594,8 @@ become_root_or_fail() {
}
mkdir_build_root() {
+ # strip trailing slash
+ test "$BUILD_ROOT" != / && BUILD_ROOT="${BUILD_ROOT%/}"
if test -d "$BUILD_ROOT" ; then
# check if it is owned by root
if test -z "$RUNNING_IN_VM" -a \! -O "$BUILD_ROOT" -a "`stat -c %u $BUILD_ROOT`" -ne 0 ; then