|
Lines 63-68
Link Here
|
| 63 |
tgz = files{i}; |
63 |
tgz = files{i}; |
| 64 |
|
64 |
|
| 65 |
if (exist (tgz, "file")) |
65 |
## The filename pointed to an uncompressed package to begin with. |
|
|
66 |
if (exist (tgz, "dir")) |
| 67 |
if (tgz(1) == '/') |
| 68 |
packdir = tgz; |
| 69 |
else |
| 70 |
packdir = fullfile (pwd(), tgz); |
| 71 |
endif |
| 72 |
elseif (exist (tgz, "file")) |
| 66 |
## Create a temporary directory. |
73 |
## Create a temporary directory. |
| 67 |
tmpdir = tmpnam (); |
74 |
tmpdir = tmpnam (); |
| 68 |
tmpdirs{end+1} = tmpdir; |
75 |
tmpdirs{end+1} = tmpdir; |
|
Lines 89-108
Link Here
|
| 89 |
if (length (dirlist) > 3) |
97 |
if (length (dirlist) > 3) |
| 90 |
error ("bundles of packages are not allowed"); |
98 |
error ("bundles of packages are not allowed"); |
| 91 |
endif |
99 |
endif |
| 92 |
endif |
|
|
| 93 |
|
100 |
|
| 94 |
## The filename pointed to an uncompressed package to begin with. |
101 |
## The two first entries of dirlist are "." and "..". |
| 95 |
if (exist (tgz, "dir")) |
102 |
packdir = fullfile (tmpdir, dirlist{3}); |
| 96 |
dirlist = {".", "..", tgz}; |
|
|
| 97 |
endif |
103 |
endif |
| 98 |
|
104 |
|
| 99 |
if (exist (tgz, "file") || exist (tgz, "dir")) |
105 |
if (exist (tgz, "file") || exist (tgz, "dir")) |
| 100 |
## The two first entries of dirlist are "." and "..". |
|
|
| 101 |
if (exist (tgz, "file")) |
| 102 |
packdir = fullfile (tmpdir, dirlist{3}); |
| 103 |
else |
| 104 |
packdir = fullfile (pwd (), dirlist{3}); |
| 105 |
endif |
| 106 |
packdirs{end+1} = packdir; |
106 |
packdirs{end+1} = packdir; |
| 107 |
|
107 |
|
| 108 |
## Make sure the package contains necessary files. |
108 |
## Make sure the package contains necessary files. |