mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-21 01:21:27 +00:00
CT_Extract: Move check extracted up
If we are using a custom location, and that custom location is a directory that does not have an associated tarball, then we shouldn't warn about not finding a tarball in CT_TARBALLS_DIR if CT_SRC_DIR/.<basename>.extracted is found. If the extracted file is not found, then we can warn that the tarball was not found then error out that the tarball is missing. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
parent
2d3c70dd3d
commit
0041a8b105
@ -938,18 +938,18 @@ CT_Extract() {
|
||||
basename="$1"
|
||||
shift
|
||||
|
||||
if ! ext="$(CT_GetFileExtension "${basename}")"; then
|
||||
CT_DoLog WARN "'${basename}' not found in '${CT_TARBALLS_DIR}'"
|
||||
return 1
|
||||
fi
|
||||
local full_file="${CT_TARBALLS_DIR}/${basename}${ext}"
|
||||
|
||||
# Check if already extracted
|
||||
if [ -e "${CT_SRC_DIR}/.${basename}.extracted" ]; then
|
||||
CT_DoLog DEBUG "Already extracted '${basename}'"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if ! ext="$(CT_GetFileExtension "${basename}")"; then
|
||||
CT_DoLog WARN "'${basename}' not found in '${CT_TARBALLS_DIR}'"
|
||||
return 1
|
||||
fi
|
||||
local full_file="${CT_TARBALLS_DIR}/${basename}${ext}"
|
||||
|
||||
# Check if previously partially extracted
|
||||
if [ -e "${CT_SRC_DIR}/.${basename}.extracting" ]; then
|
||||
CT_DoLog ERROR "The '${basename}' sources were partially extracted."
|
||||
|
Loading…
x
Reference in New Issue
Block a user