From 9243a740713072176f86394b7fa92b4b392c8614 Mon Sep 17 00:00:00 2001 Message-Id: <9243a740713072176f86394b7fa92b4b392c8614.1718268320.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 9 Feb 2016 14:07:28 +0000 Subject: [PATCH] bin/mdw-build: Detect Scratchbox2 and qualify the `dist-...' dir name. Organization: Straylight/Edgeware From: Mark Wooding --- bin/mdw-build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/mdw-build b/bin/mdw-build index 9d2dad6..fa3eb3e 100755 --- a/bin/mdw-build +++ b/bin/mdw-build @@ -197,8 +197,15 @@ while [ ! -f configure.ac -a ! -f configure.in -a \ done assign srcpath $(pwd) +## Build any necessary qualifiers. +qual= sep=. +case ${SBOX_SESSION_DIR+t},${DEB_BUILD_ARCH+t} in + t,t) qual=$qual$sep$DEB_BUILD_ARCH; sep=- ;; + t,*) fail "unknown build arch" ;; +esac + ## Construct the output directory. -assign releasepath $srcpath/dist-$build +assign releasepath $srcpath/dist-$build$qual chmod -R +w $releasepath 2>/dev/null || : rm -rf $releasepath 2>/dev/null || : mkdir $releasepath -- [mdw]