Skip to content

Commit

Permalink
chore: 似乎单表情包打包会由于文件数量过多出现 500 错误,合并为单个文件上传
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoaer committed May 21, 2023
1 parent f5372a5 commit abab458
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions exec.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
#!/bin/bash
if [ ! -d "./bilibili-stickers" ]; then
if [ ! -d "./sticker-downloader" ]; then
# compile
go build -o bilibili-stickers -ldflags "-s -w" ./
go build -o sticker-downloader -ldflags "-s -w" ./
fi

# download emojis
./bilibili-stickers
./sticker-downloader

# make package dir
if [ ! -d "./package" ]; then
mkdir ./package
fi

# copy executable file
cp ./bilibili-stickers ./package/
mv ./sticker-downloader ./package/

# zip stickers file
zip -r ./package/stickers.zip ./stickers/

stickers=$(ls ./stickers)
for sticker in $stickers; do
if [ -d ./stickers/$sticker ]; then
echo $sticker
if [ ! -f "$sticker.zip" ]; then
zip -r $sticker.zip ./stickers/$sticker
fi
mv $sticker.zip ./package/
fi
done

0 comments on commit abab458

Please sign in to comment.