]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
tools/ci-build.sh: Clean up directories from possible previous builds
authorRalf Habacker <ralf.habacker@freenet.de>
Mon, 9 Nov 2020 10:06:14 +0000 (11:06 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Tue, 24 Nov 2020 07:08:42 +0000 (07:08 +0000)
Otherwise, ci-build.sh cannot be executed on a local system if there
are previous runs.

tools/ci-build.sh

index aea2671065aeb6f5ab25dc6312addf5add62de6b..7fed2e46ef703a45877b858964292162fb73d53f 100755 (executable)
@@ -154,10 +154,12 @@ NOCONFIGURE=1 ./autogen.sh
 
 case "$ci_buildsys" in
     (cmake-dist)
+        # clean up directories from possible previous builds
+        rm -rf ci-build-dist
         # Do an Autotools `make dist`, then build *that* with CMake,
         # to assert that our official release tarballs will be enough
         # to build with CMake.
-        mkdir ci-build-dist
+        mkdir -p ci-build-dist
         ( cd ci-build-dist; ../configure )
         make -C ci-build-dist dist
         tar --xz -xvf ci-build-dist/dbus-1.*.tar.xz
@@ -185,7 +187,9 @@ case "$ci_host" in
 esac
 
 srcdir="$(pwd)"
-mkdir ci-build-${ci_variant}-${ci_host}
+# clean up directories from possible previous builds
+rm -rf ci-build-${ci_variant}-${ci_host}
+mkdir -p ci-build-${ci_variant}-${ci_host}
 cd ci-build-${ci_variant}-${ci_host}
 
 make="make -j${ci_parallel} V=1 VERBOSE=1"