5807
|
1 ## Copyright (C) 2005 S�ren Hauberg |
|
2 ## |
6049
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
|
6 ## under the terms of the GNU General Public License as published by |
|
7 ## the Free Software Foundation; either version 2, or (at your option) |
|
8 ## any later version. |
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
|
14 ## |
5807
|
15 ## You should have received a copy of the GNU General Public License |
6049
|
16 ## along with Octave; see the file COPYING. If not, write to the Free |
|
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
18 ## 02110-1301, USA. |
5807
|
19 |
|
20 ## -*- texinfo -*- |
5808
|
21 ## @deftypefn {Function File} unzip (@var{zipfile}, @var{dir}) |
|
22 ## Unpack the ZIP archive @var{zipfile} to the directory @var{dir}. |
|
23 ## If @var{dir} is not specified, it defaults to the current directory. |
6081
|
24 ## @seealso{unpack, bzip2, bunzip2, tar, untar, gzip, gunzip, zip} |
5807
|
25 ## @end deftypefn |
|
26 |
5808
|
27 ## Author: S�ren Hauberg <hauberg@gmail.com> |
6081
|
28 ## Adapted-By: jwe, Bill Denney |
5808
|
29 |
6081
|
30 function varargout = unzip (files, outputdir) |
5808
|
31 |
6082
|
32 if (! (nargin == 1 || nargin == 2)) |
6081
|
33 print_usage (); |
5808
|
34 endif |
|
35 |
6081
|
36 if (nargin == 1) |
|
37 outputdir = "."; |
|
38 endif |
|
39 varargout = cell (1, nargout); |
|
40 [varargout{:}] = unpack (files, outputdir, mfilename ()); |
|
41 |
5807
|
42 endfunction |