2001-01-09 05:58:40 +00:00
|
|
|
#!/bin/bash
|
2001-01-09 22:49:14 +00:00
|
|
|
# create pak files with gzipped internals
|
2001-01-09 05:58:40 +00:00
|
|
|
|
|
|
|
if [ $# -eq 0 ]; then
|
2001-01-09 23:51:55 +00:00
|
|
|
echo "usage: $0 <pakfile> ..."
|
2001-01-09 05:58:40 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
for pakfile in $*; do
|
|
|
|
if [ ! -f ${pakfile} ]; then echo ${pakfile} not found; continue; fi
|
|
|
|
[ "${pakfile#/}" = "${pakfile}" ] && pakfile=`pwd`/${pakfile}
|
|
|
|
|
|
|
|
tmp=/var/tmp/zpak.$$
|
|
|
|
|
|
|
|
mkdir ${tmp}
|
|
|
|
cd ${tmp}
|
2002-08-19 04:00:02 +00:00
|
|
|
pak -vxf ${pakfile} | sed -e 's/$/.gz/' > pakfile.lst
|
2001-01-09 05:58:40 +00:00
|
|
|
mv ${pakfile} ${pakfile}.bak
|
|
|
|
gzip -rv9 *
|
2002-08-19 04:00:02 +00:00
|
|
|
pak -vcf ${pakfile} `zcat pakfile.lst.gz`
|
2001-01-09 05:58:40 +00:00
|
|
|
cd -
|
|
|
|
rm -rf ${tmp}
|
|
|
|
done
|