Mercurial > hg > octave-nkf
annotate scripts/miscellaneous/untar.m @ 11523:fd0a3ac60b0e
update copyright notices
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 14 Jan 2011 05:47:45 -0500 |
parents | c776f063fefe |
children | c792872f8942 |
rev | line source |
---|---|
11523 | 1 ## Copyright (C) 2005-2011 S�ren Hauberg |
5807 | 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 | |
7016 | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
8 ## your option) any later version. | |
6049 | 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 |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
5807 | 18 |
19 ## -*- texinfo -*- | |
6248 | 20 ## @deftypefn {Function File} {} untar (@var{tarfile}, @var{dir}) |
5808 | 21 ## Unpack the TAR archive @var{tarfile} to the directory @var{dir}. |
22 ## If @var{dir} is not specified, it defaults to the current directory. | |
8297 | 23 ## @seealso{unpack, bunzip2, tar, gzip, gunzip, zip, unzip} |
5807 | 24 ## @end deftypefn |
25 | |
5808 | 26 ## Author: S�ren Hauberg <hauberg@gmail.com> |
6081 | 27 ## Adapted-By: jwe, Bill Denney |
5808 | 28 |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
8920
diff
changeset
|
29 function varargout = untar (tarfile, dir = ".") |
5808 | 30 |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
8920
diff
changeset
|
31 if (nargin != 1 && nargin != 2) |
6081 | 32 print_usage (); |
5808 | 33 endif |
34 | |
6599 | 35 if (nargout > 0) |
36 varargout = cell (1, nargout); | |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
8920
diff
changeset
|
37 [varargout{:}] = unpack (tarfile, dir, mfilename ()); |
6599 | 38 else |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
8920
diff
changeset
|
39 unpack (tarfile, dir, mfilename ()); |
6599 | 40 endif |
6081 | 41 |
5807 | 42 endfunction |