chiark / gitweb /
bin/mdw-build: Detect Scratchbox2 and qualify the `dist-...' dir name.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 9 Feb 2016 14:07:28 +0000 (14:07 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 9 Feb 2016 14:07:28 +0000 (14:07 +0000)
bin/mdw-build

index 9d2dad61bda88825f39bfdbe4586a48e7d1df177..fa3eb3ef63ba9ea12f07abf3d562a07e8d0eee99 100755 (executable)
@@ -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