scripts/functions
changeset 3203 74fd467be5aa
parent 3169 9d0b37f08a10
child 3205 30de175d3ed3
     1.1 --- a/scripts/functions	Sun Jan 20 12:58:22 2013 +0000
     1.2 +++ b/scripts/functions	Sun Mar 31 04:07:38 2013 +0000
     1.3 @@ -523,6 +523,7 @@
     1.4      printf ".tar.bz2\n"
     1.5      printf ".tar.gz\n.tgz\n"
     1.6      printf ".tar\n"
     1.7 +    printf ".zip\n"
     1.8  }
     1.9  
    1.10  # Get the file name extension of a component
    1.11 @@ -861,7 +862,7 @@
    1.12  # by the caller, that did a 'cd' into the correct path before calling us
    1.13  # and sets nochdir to 'nochdir'.
    1.14  # Note also that this function handles the git trees!
    1.15 -# Usage: CT_Extract <basename> [nochdir] [options]
    1.16 +# Usage: CT_Extract [nochdir] <basename> [options]
    1.17  # where 'options' are dependent on the source (eg. git branch/tag...)
    1.18  CT_Extract() {
    1.19      local nochdir="$1"
    1.20 @@ -926,6 +927,7 @@
    1.21          .tar.bz2)     bzip2 -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
    1.22          .tar.gz|.tgz) gzip -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
    1.23          .tar)         CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";;
    1.24 +        .zip)         CT_DoExecLog FILE unzip "${@}" "${full_file}";;
    1.25          /.git)        CT_ExtractGit "${basename}" "${@}";;
    1.26          *)            CT_DoLog WARN "Don't know how to handle '${basename}${ext}': unknown extension"
    1.27                        return 1