X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=bin%2Fget_globals.sh;fp=bin%2Fget_globals.sh;h=f235dfbc1d70fac7944e9dcd61257db2f761afbb;hb=ad168d33f53581e082fa52a392c84af861afe47d;hp=0000000000000000000000000000000000000000;hpb=6df7632d387a4b4ce24b28db98fae3ae2fcb647c;p=brisk.git diff --git a/bin/get_globals.sh b/bin/get_globals.sh new file mode 100755 index 0000000..f235dfb --- /dev/null +++ b/bin/get_globals.sh @@ -0,0 +1,17 @@ +#!/bin/bash +glob="$(grep '$G_' $(find -type f -name '*.ph*') | sed 's/\$G_/\n\$G_/g' | grep '^\$G_' | sed 's/[^\$a-zA-Z0-9_].*//g' | sort | uniq | sed 's/\$//g' )" + +li="" +for i in $glob ; do + if [ $(echo "${li}, '$i'," | wc -c) -gt 80 ]; then + echo $li + li="" + fi + if [ "$li" = "" ]; then + li="'${i}', " + else + li="${li} '${i}'," + fi +done + +