summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2015-11-25 23:56:38 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2015-12-08 15:20:16 (GMT)
commit0041a8b1051e06dcb235780773f6b82d6685f428 (patch)
tree4f675d9bcf7995044eb687212cda03f890d65846 /scripts/functions
parent2d3c70dd3ddc5a569c0fa1a833fd5920029b5794 (diff)
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>
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/functions b/scripts/functions
index e266626..4761c1e 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -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."