3 echo "current pak files: $1"
4 echo "expanded updated source: $2"
5 echo "new pak file: $3"
11 ls "$1/"*.pk4 | while read i ; do unzip -l $i | cut -b 29- | tee $TMPDIR/`basename $i`.log ; done
13 ls $TMPDIR/*.log | while read i ; do lines=`cat $i | wc -l` ; tail +4 $i | head -$(( $lines - 5 )) | tee $TMPDIR/`basename $i`.2 ; done
16 #ls $TMPDIR/*.log | while read i ; do diff $i $i.2 ; done
18 cat $TMPDIR/*.log.2 | sort -u | tee $TMPDIR/sorted-unique.log
20 # now the magical zip command
23 cat $TMPDIR/sorted-unique.log | zip -b $TMPDIR $3 -@ 1>/dev/null