mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
fix: fix zip filename encoding issue
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/9840
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
zipinfo -O GB2312 -v $1 \
|
||||
zipinfo -O utf8 -v $1 \
|
||||
| sed -n -e '/^Central directory entry/,+3p' -e '/32-bit CRC value (hex):/p' | grep '^ ' \
|
||||
| sed -e 's/^ //g' | sed -z 's/\n32-bit CRC value (hex):\s*/\t/g' \
|
||||
| awk '{last = $NF; $NF=""; print last,$0}'
|
||||
|
||||
@@ -25,6 +25,6 @@ tmpdir=$(mktemp -d /tmp/zipota-files.XXX)
|
||||
comm -23 <(echo "$from_fn") <(echo "$to_fn") > "$tmpdir"/removelist.txt
|
||||
echo "$to_fn" > "$tmpdir"/filelist.txt
|
||||
|
||||
zip -r -j "$out_zip" "$tmpdir"/removelist.txt "$tmpdir"/filelist.txt
|
||||
zip -X -r -j "$out_zip" "$tmpdir"/removelist.txt "$tmpdir"/filelist.txt
|
||||
|
||||
rm -rf $tmpdir
|
||||
|
||||
Reference in New Issue
Block a user