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-layouts.sh

18 lines
415 B
Bash

#!/bin/bash
PROJECT=$(cd `dirname $0`/..; pwd)
pushd ${PROJECT}
echo ${PROJECT}
path=astrid/src/main/res/layout
for file in $(ls -l ${path} | awk '{ print $9}' | sed 's/\..\+//g'); do
if [ ! -f ${path}/${file} ]; then
continue
fi;
filename=`basename ${file}`
filename=${filename%.*}
git grep -q ${filename}
if [ $? -ne 0 ]; then
echo -e "${file} not used"
fi;
done;
popd