chiark / gitweb /
bin/mdw-build: Delay official `assign' for `$toppath' and `$releasepath'.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 10 May 2020 13:59:14 +0000 (14:59 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 10 May 2020 18:46:54 +0000 (19:46 +0100)
... until after we've established the logfile.  Otherwise it won't
capture these things.

bin/mdw-build

index 10557a8fa5898286cd69f6be3cd6a6e25c29ef12..fb98ffad6675fd06e1a2d10c65bb58d65e677fb0 100755 (executable)
@@ -253,7 +253,7 @@ while [ ! -f configure.ac -a ! -f configure.in -a \
   esac
   cd ..
 done
-assign toppath $(pwd)
+toppath=$(pwd)
 
 ## Build any necessary qualifiers.
 qual= sep=.
@@ -263,7 +263,7 @@ case ${SBOX_SESSION_DIR+t},${DEB_BUILD_ARCH+t} in
 esac
 
 ## Construct the output directory.
-assign releasepath $toppath/dist-$build$qual
+releasepath=$toppath/dist-$build$qual
 chmod -R +w $releasepath 2>/dev/null || :
 rm -rf $releasepath 2>/dev/null || :
 mkdir $releasepath
@@ -275,6 +275,10 @@ case $verbose in
     ;;
 esac
 
+## Repeat the earlier assignments for tbe benefit of the logfile.
+assign toppath $toppath
+assign releasepath $releasepath
+
 ## Do we have a Git repository?
 case "$checkout,$setup,$(yesno [ -d $toppath/.git ])" in
   yes,no,*)