mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-03-14 04:01:06 +00:00
script to ease the pain of compressing paks. needs pak-0.2.2
This commit is contained in:
parent
6cfe4a3128
commit
2f8e140023
1 changed files with 22 additions and 0 deletions
22
tools/zpak
Executable file
22
tools/zpak
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo 'usage: $0 <pakfile> ...'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for pakfile in $*; do
|
||||||
|
[ -f ${pakfile} ] || echo ${pakfile} not found && continue
|
||||||
|
[ "${pakfile#/}" = "${pakfile}" ] && pakfile=`pwd`/${pakfile}
|
||||||
|
|
||||||
|
tmp=/var/tmp/zpak.$$
|
||||||
|
|
||||||
|
mkdir ${tmp}
|
||||||
|
cd ${tmp}
|
||||||
|
pak vxf ${pakfile} | sed -e 's/$/.gz/' > pakfile.lst
|
||||||
|
mv ${pakfile} ${pakfile}.bak
|
||||||
|
gzip -rv9 *
|
||||||
|
pak vcf ${pakfile} `zcat pakfile.lst.gz`
|
||||||
|
cd -
|
||||||
|
rm -rf ${tmp}
|
||||||
|
done
|
Loading…
Reference in a new issue