-
Define this exports: (size -> suffix)
- 1x -> @1x - 0.66x -> @0,66x - 0.5x -> @0,5x - 0.33x -> @0,33x
- Open command line to the exported directory
- Run this script
sh order_ps_res.sh
#!/bin/bash | |
res_organize() { | |
res_dir=$1 | |
res_suffix=$2 | |
if [ ! -d "./${res_dir}" ]; then | |
mkdir ./${res_dir} | |
fi; | |
echo "Move all \"*${res_suffix}.*\" to ${res_dir}:" | |
for file in `echo *${res_suffix}*`; do | |
new_name=`echo $file | tr -d ${res_suffix} | tr -s " " "_"` | |
echo " >>> \"`echo ${file}`\" -> \"${new_name}\"" | |
mv ${file} ./${res_dir}/${new_name} | |
done; | |
} | |
res_organize drawable-mdpi @0,33x | |
res_organize drawable-hdpi @0,5x | |
res_organize drawable-xhdpi @0,66x | |
res_organize drawable-xxhdpi @1x |