"next" link on episode page refers to current one
[mygpo.git] / bin / couchdb-view-usage.sh
blob350ada695fb1ef8227ea3210332eb7a16a5ebdf4
1 #!/bin/bash
3 DIR=`dirname $0`
4 cd $DIR/../couchdb/_design
5 DIRS=`find . -type d -wholename "*/views/*"`
7 cd ../..
8 for view in $DIRS; do
9 view_name=`echo $view | awk '{split($0,array,"/")} END{print array[2]"/"array[4]}'`
10 count=`git grep "'$view_name'" | wc -l`
11 if [ $count = "0" ]; then
12 echo -e -n "\e[00;31m"
14 echo $view_name $count | awk '{ printf "%-40s%-5s\n",$1,$2}'
15 echo -e -n '\e[00m'
16 done