awtk/scripts/create_assets_zip.sh

51 lines
566 B
Bash
Raw Normal View History

2020-02-27 18:35:18 +08:00
#!/bin/bash
2021-09-13 18:17:00 +08:00
if [ "$1" == "" ]
then
SRC=res/assets
else
SRC="$1"
fi
echo "SRC=$SRC"
2020-02-27 18:35:18 +08:00
2021-07-11 16:42:44 +08:00
if [ -e "$SRC" ]
then
echo "preparing..."
else
echo "res/assets not exists"
exit 0
fi
2020-02-27 18:35:18 +08:00
rm -rf temp
rm -f assets.zip
mkdir temp
cp -rf "$SRC" temp
cd temp/assets
2021-07-11 16:42:44 +08:00
rm -fv *.inc
2020-02-27 18:35:18 +08:00
for f in *;
do
if [ -d $f ]
then
echo "clean " $f;
rm -rvf $f/inc
rm -rvf $f/raw/ui/*.xml
rm -rvf $f/raw/styles/*.xml
rm -rvf $f/raw/strings/*.xml
fi
done
cd ..
zip -r ../assets.zip assets
cd ..
rm -rf temp
2021-07-11 16:42:44 +08:00
echo "assets saved to assets.zip:"
2020-02-27 18:35:18 +08:00
ls -l assets.zip