aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Nohlgård <joakim@nohlgard.se>2022-11-30 10:03:37 +0100
committerChris Packham <judge.packham@gmail.com>2022-12-04 16:02:37 +1300
commit4f5c57fdb3b6657a38f146e06843e1477ff94650 (patch)
treec9e704ec7675910ef35c15bed14e44360516ef52
parentd13c526f73f713a9e6f1943db3be7b8878d93c6e (diff)
downloadcrosstool-ng-4f5c57fdb3b6657a38f146e06843e1477ff94650.tar.gz
crosstool-ng-4f5c57fdb3b6657a38f146e06843e1477ff94650.tar.bz2
crosstool-ng-4f5c57fdb3b6657a38f146e06843e1477ff94650.zip
Detect if a package src_dir is missing
If a user deletes the package directory under .build/src/ but fails to remove the hidden stamp files the CT_DoExtractPatch function will detect this, delete the stamps and perform the full extract-and-patch step. Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
-rw-r--r--scripts/functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index 0d799ae6..09fa29af 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -2283,10 +2283,11 @@ CT_DoExtractPatch()
CT_DoExecLog ALL rm -f "${src_dir}/.${basename}".*
fi
- if [ -f "${src_dir}/.${basename}.extracted" ]; then
+ if [ -f "${src_dir}/.${basename}.extracted" -a -d "${src_dir}/${basename}" ]; then
CT_DoLog DEBUG "Already extracted ${basename}"
else
CT_DoLog EXTRA "Extracting ${basename}"
+ CT_DoExecLog ALL rm -f "${src_dir}/.${basename}".*
CT_DoExecLog ALL touch "${src_dir}/.${basename}.extracting"
if [ "${src_release}" = "y" ]; then
archive="${archive_filename}"