2022-03-12 08:15:50 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Package every sources into a "Name.zip" file in the "sources_package" directory.
|
|
|
|
|
2024-04-27 07:42:59 +08:00
|
|
|
OUTPUT_DIR=$(realpath sources_packages)
|
|
|
|
mkdir -p "$OUTPUT_DIR"
|
2022-03-12 08:15:50 +08:00
|
|
|
|
|
|
|
for DIR in src/sites/*/; do
|
|
|
|
NAME=$(basename "$DIR")
|
|
|
|
|
2022-03-17 03:06:01 +08:00
|
|
|
[[ $NAME =~ ^(Sankaku|Tumblr)$ ]] && continue
|
2022-03-12 08:15:50 +08:00
|
|
|
[[ ! -f "$DIR/model.js" ]] && continue
|
|
|
|
|
|
|
|
pushd "$DIR"
|
2022-03-12 18:31:02 +08:00
|
|
|
zip "$OUTPUT_DIR/$NAME.zip" model.js icon.png sites.txt */defaults.ini */tag-types.txt
|
2022-03-12 08:15:50 +08:00
|
|
|
popd
|
|
|
|
done
|