lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 126538c: Fix defect introduced 20180416T1932Z


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 126538c: Fix defect introduced 20180416T1932Z: rm dash rf "$undefined"
Date: Mon, 16 Apr 2018 18:23:11 -0400 (EDT)

branch: master
commit 126538c60d4a7466393355d227d4b2b9851cc5c5
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Fix defect introduced 20180416T1932Z: rm dash rf "$undefined"
    
    Rearranged code so that $build_dir is defined before deleting what it
    expands to. Also rewrote 'rm -rf X' as 'rm -rf ./X' because at least
    it gives an error when $X is not defined.
---
 install_wx.sh | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/install_wx.sh b/install_wx.sh
index ae308ac..9f7b78c 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -75,17 +75,6 @@ git checkout "$wx_commit_sha"
 # Get any new submodules that may have been added, even if nested.
 git submodule update "$coefficiency" --recursive --init
 
-if [ "$wx_skip_clean" != 1 ]
-then
-    rm --force --recursive "$build_dir"
-    # This incidentally removes wxPdfDoc, but it's a good idea to rebuild that
-    # whenever wx is upgraded anyway.
-    rm --force --recursive $exec_prefix/bin/wx*
-    rm --force --recursive $exec_prefix/include/wx*
-    rm --force --recursive $exec_prefix/lib/wx*
-    rm --force --recursive $exec_prefix/lib/libwx*
-fi
-
 build_type=$("$proxy_wx_dir"/config.guess)
 host_type=i686-w64-mingw32
 
@@ -100,9 +89,6 @@ esac
 gcc_version=$(${mingw_bin_dir}${host_type}-gcc -dumpversion|tr -d '\r')
 vendor=gcc-$gcc_version-$wx_commit_sha
 
-build_dir="$prefix"/../wx-scratch/lmi-gcc-$gcc_version
-mkdir --parents "$build_dir"
-
 # Configuration reference:
 #   http://lists.nongnu.org/archive/html/lmi/2007-11/msg00001.html
 
@@ -146,6 +132,21 @@ config_options="
 
 [ -n "$mingw_bin_dir" ] && export PATH="$mingw_bin_dir:${PATH}"
 
+build_dir="$prefix"/../wx-scratch/lmi-gcc-$gcc_version
+
+if [ "$wx_skip_clean" != 1 ]
+then
+    rm --force --recursive ./"$build_dir"
+    # This incidentally removes wxPdfDoc, but it's a good idea to rebuild that
+    # whenever wx is upgraded anyway.
+    rm --force --recursive ./$exec_prefix/bin/wx*
+    rm --force --recursive ./$exec_prefix/include/wx*
+    rm --force --recursive ./$exec_prefix/lib/wx*
+    rm --force --recursive ./$exec_prefix/lib/libwx*
+fi
+
+mkdir --parents "$build_dir"
+
 cd "$build_dir"
 "$proxy_wx_dir"/configure $config_options
 $MAKE



reply via email to

[Prev in Thread] Current Thread [Next in Thread]