]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
make.sh: Use path variables for cleanup
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Jul 2024 09:17:05 +0000 (09:17 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 8 Jul 2024 15:39:43 +0000 (15:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index d97d0afef4f6fa39b188eea2c2ce1c713883a573..a8855c7c4232ad1977779d6b604b1586115534ce 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -2033,13 +2033,18 @@ shell)
 clean)
        print_line "Cleaning build directory..."
 
-       rm -rf $BASEDIR/build
-       rm -rf $BASEDIR/cdrom
-       rm -rf $BASEDIR/packages
-       rm -rf $BASEDIR/log
+       # Cleanup build files
+       rm -rf \
+               "${BUILD_DIR}" \
+               "${BASEDIR}/cdrom" \
+               "${BASEDIR}/packages" \
+               "${LOG_DIR}"
+
+       # Remove the /tools symlink
        if [ -h "${TOOLS_DIR}" ]; then
                rm -f "${TOOLS_DIR}"
        fi
+
        print_status DONE
        ;;
 downloadsrc)