zipflags=-9
find "$@" -exec touch -d "2001-01-01 01:01:01 +0000" {} \+ # ugly hack to make the pk3 files rsync-friendly
ziplist=`mktemp`
- find "$@" -xtype f \( -executable -or -type l \) -print > "$ziplist"
+ find "$@" -xtype f \( -executable -or -type l \) -print | sed 's,\([./][^./]*$\),\1 \1,' | sort -k2 | cut -d\ -f1 > "$ziplist"
7za a -tzip $sevenzipflags -x@"$ziplist" "$archive" "$@" || true
zip $zipflags -y -@<"$ziplist" "$archive" || true
rm -f "$ziplist"