awtk/scripts/create_assets_zip.sh

41 lines
430 B
Bash
Raw Normal View History

2020-02-27 18:35:18 +08:00
#!/bin/bash
SRC=$1
if [ -z "$SRC" ]
then
echo "Usage: $0 assets_dir"
exit 0
fi
rm -rf temp
rm -f assets.zip
mkdir temp
cp -rf "$SRC" temp
cd temp/assets
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
ls -l assets.zip