find_unused.sh 408 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. echo "Searching for unused stkgui files"
  3. echo "---------------------------------"
  4. cd data/gui
  5. l=""
  6. for i in $(find . -iname "*.stkgui"); do
  7. s=$(basename $i)
  8. x=$(find ../../src/states_screens -type f -exec grep -H $s \{} \; | wc -l)
  9. echo -n "."
  10. if [ $x == "0" ]; then
  11. l="$l $i"
  12. fi
  13. done
  14. echo
  15. for i in $l; do
  16. echo "$i appears to be not used."
  17. done
  18. echo "done"