Zip and tar.gz
Martin Krischik
krischik at users.sourceforge.net
Tue Sep 16 09:31:41 PDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I have run into a little problem when creating a a Portfile and I
wonder if there is a solution to it.
The program I try to port consists of 2 archive:
1) The primary program which comes a .tar.gz file
2) Some supplemental files which comes as a .zip file.
With "use_zip yes" the .tar.gz file can't be expanded and without the
zip file can't be expanded. So I am kind of snookered. Any way out?
Martin
PS: for RPM based packages I used the following shell function which
always worked without fail:
function Unpack () # {{{1
{
local in_File=${1};
local in_Dir=${2};
local Retval=1;
if test -z ${in_Dir} ||
test ! -d ${in_Dir}
then
case "${in_File}" in
(*.tgz|*.tar.gz)
tar --extract --gzip --file "${in_File}";
;;
(*.tar.bz2)
tar --extract --bzip2 --file "${in_File}";
;;
(*.zip)
unzip -oq "${in_File}" -d "${in_Dir}"
;;
esac;
Retval=0;
fi;
return ${Retval};
} # }}}1
- --
Martin Krischik
krischik at users.sourceforge.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iD8DBQFIz99tijwKaHyem9cRAkQhAKCv3xMlZWSU9DGnQY8mF3gLrC+gGACcDyCv
Yn+G68YAyiuSX7685crtd3Q=
=zsjr
-----END PGP SIGNATURE-----
More information about the macports-dev
mailing list