aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortokomine <tokomine.s@gmail.com>2023-08-30 10:14:36 +0800
committerZeranoe <zeranoe@gmail.com>2024-05-25 13:19:28 -0400
commitebc892c9c890a12ad72d1263f62db071eb1fbd55 (patch)
treeec4cf046c960bdecbe45c39dddf7445eda8a3bc0
parent219472d381f4f7587a0b251bf32784fcf514b971 (diff)
fix SRC_PATH when CACHED_SOURCES
-rwxr-xr-xmingw-w64-build12
1 files changed, 7 insertions, 5 deletions
diff --git a/mingw-w64-build b/mingw-w64-build
index d6a2799..4d0da33 100755
--- a/mingw-w64-build
+++ b/mingw-w64-build
@@ -394,11 +394,7 @@ fi
TOTAL_STEPS=0
-if [ "$CACHED_SOURCES" ]; then
- if [ ! -f "$SRC_PATH/config.guess" ]; then
- arg_error "no sources found, run with --keep-artifacts first"
- fi
-else
+if [ ! "$CACHED_SOURCES" ]; then
TOTAL_STEPS=$((TOTAL_STEPS + 4))
fi
@@ -438,10 +434,16 @@ mkdir -p "$ROOT_PATH"
rm -f "$LOG_FILE"
touch "$LOG_FILE"
+
if [ ! "$CACHED_SOURCES" ]; then
download_sources
+else
+ if [ ! -f "$SRC_PATH/config.guess" ]; then
+ arg_error "no sources found, run with --keep-artifacts first"
+ fi
fi
+
BUILD=$(sh "$SRC_PATH/config.guess")
change_dir "$SRC_PATH/gcc"