You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tasks/bin/find-unused-drawables.sh

17 lines
501 B
Bash

#!/bin/bash
DIR="../astrid/src/main/res/drawable"
for file in $(ls -l ${DIR} | awk '{ print $9}' | sed 's/\..\+//g'); do
if [ ! -f ${DIR}/${file} ]; then
echo "ignoring ${file}"
continue
fi;
filename=`basename ${file}`
filename=${filename%%.*}
git grep -q ${filename} ..
if [ $? -ne 0 ]; then
echo -e "${file} not used"
fi;
done;
#let "count+=$(grep -c @drawable/$file $SRCFILE)";
#let "count+=$(grep -c R.drawable.$file $SRCFILE)";