diff --git a/lang/addlang.sh b/lang/addlang.sh index 2a49bace..034c1dc2 100755 --- a/lang/addlang.sh +++ b/lang/addlang.sh @@ -8,7 +8,15 @@ if [ "x$1" = "x" ] echo "available language file." exit 1 else - find . -maxdepth 1 -name \*.php -exec ./append.sh $1 {} \; + if [ ! -f $1 ]; then + echo "$1 does not exist." + exit 10; + fi + find . -maxdepth 1 -name \*.inc.php -exec ./append.sh $1 {} \; + TIMESTAMP=$(date +"%Y%m%d%H%M") + mv $1 $1.$TIMESTAMP cd UTF-8 ./recode.sh + echo "-------------------------------------------------" + echo "Please check the result and remove $1.$TIMESTAMP." fi