diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-03-04 18:25:58 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-03-04 18:25:58 (GMT) |
commit | fec3baeca6117d62e9d0238dd41cdb67315cb540 (patch) | |
tree | d2b71142b4c1633663e47306f1fce0728bbd8007 /scripts | |
parent | 806a517cc2107d3176475346f6be4ac065015119 (diff) |
Check that a pacakge was previously extracted prior to patching.
Fix a comment.
/trunk/scripts/functions | 8 5 3 0 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/functions | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/functions b/scripts/functions index 3dc35f4..19acaed 100644 --- a/scripts/functions +++ b/scripts/functions @@ -180,8 +180,8 @@ CT_HasOrAbort() { } # Search a program: wrap "which" for those system where -# "which" verbosely says there is no match (Mdk are such -# suckers...) +# "which" verbosely says there is no match (Mandriva is +# such a sucker...) # Usage: CT_Which <filename> CT_Which() { which "$1" 2>/dev/null || true @@ -445,7 +445,6 @@ CT_GetLocal() { CT_DoLog DEBUG "Trying to retrieve an already downloaded copy of '${basename}'" # We'd rather have a bzip2'ed tarball, then gzipped tarball, plain tarball, # or, as a failover, a file without extension. - # Try local copy first, if it exists for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do CT_DoLog DEBUG "Trying '${CT_LOCAL_TARBALLS_DIR}/${basename}${ext}'" if [ -r "${CT_LOCAL_TARBALLS_DIR}/${basename}${ext}" -a \ @@ -636,6 +635,9 @@ CT_Patch() { return 0 fi + # Check if already extracted + CT_TestOrAbort "'${basename}' is not yet extracted while attempting to patch" -e "${CT_SRC_DIR}/.${basename}.extracted" + [ "${nochdir}" = "nochdir" ] || CT_Pushd "${CT_SRC_DIR}/${basename}" CT_DoLog EXTRA "Patching '${basename}'" |