libreoffice-online/scripts/unused-js-functions.sh
Henry Castro 5864481c13 scripts: rename loleaflet -> browser
Change-Id: I108162981aa66a804a855a18f45f7369c20edfe0
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00

10 lines
390 B
Bash
Executable file

#! /bin/bash
find browser/src/ -name "*.js" -exec grep ': function' \{\} \; | sed -e 's/:.*//' -e 's/^[\t ]*//' -e 's/[\t ]*$//' | grep -v " " | sort | uniq | \
while read FUNC ; do
NUM=`git grep "\<$FUNC\>" browser/src/ | wc -l`
#echo "Trying $FUNC: $NUM"
if [ "$NUM" = "1" ] ; then
git --no-pager grep "\<$FUNC\>" browser/src/
fi
done