check_lang.sh

来自「phpMyAdmin图形界面化操作,我已经配置好了,只要把解要压缩后的文件放到站」· Shell 代码 · 共 63 行

SH
63
字号
#!/bin/sh# $Id: check_lang.sh 10648 2007-09-15 23:31:45Z lem9 $### Shell script to check that all language files are syncronized# Catches duplicate/missing strings## Robin Johnson <robbat2@users.sourceforge.net># August 9, 2002##MASTER="english-utf-8.inc.php"TMPDIR="tmp-check"FILEPAT="*.inc.php"STRINGMATCH='^[[:space:]]*\$[[:alnum:]_]+[[:blank:]]+='IGNOREMATCH='strEncto|strKanjiEncodConvert|strXkana|allow_recoding|doc_lang'if [ "`which diffstat`" = "" ] ; then    echo 'You need diffstat to use this!'    exit 1firm -rf $TMPDIRmkdir -p $TMPDIR# Build the list of variables in each fileecho "Building data"for f in $FILEPAT;do    awk "/$STRINGMATCH/ && ! /$IGNOREMATCH/ { print \$1 }" $f | sort > $TMPDIR/$fdone# Build the diff files used for checking# And if there are no differences, delete the empty filesecho "Comparing data"for f in $FILEPAT;do    if [ ! $MASTER = $f ]; then        if diff -u $TMPDIR/$MASTER $TMPDIR/$f >$TMPDIR/$f.diff ; then            rm -f $TMPDIR/$f.diff $TMPDIR/$f        fi    fidone# Cleanuprm -f $TMPDIR/$MASTER# Build the nice difference tableecho "Differences"diffstat -f 0 $TMPDIR/*.diff >$TMPDIR/diffstat 2>/dev/nullecho "Dupe	Miss	Filename"head -n -1 $TMPDIR/diffstat | \while read filename sep change add plus sub minus edits exclaim; do     echo "$add	$sub	$filename"; doneechoecho "Dupe = Duplicate Variables"echo "Miss = Missing Variables"echo "For exact problem listings, look in the $TMPDIR/ directory"echo "Please remember to remove '$TMPDIR/' once you are done"

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?