1 #!/bin/bash 2 3 if [ "x$1" = "x" ] 4 then 5 echo "USAGE: addlang.sh INPUT-FILE" 6 echo "----------------------------" 7 echo "This script will append the contents of INPUT-FILE to every " 8 echo "available language file." 9 exit 1 10 else 11 if [ ! -f $1 ]; then 12 echo "$1 does not exist." 13 exit 10; 14 fi 15 find . -maxdepth 1 -name \*.inc.php -exec ./append.sh $1 {} \; 16 TIMESTAMP=$(date +"%Y%m%d%H%M") 17 mv $1 $1.$TIMESTAMP 18 cd UTF-8 19 ./recode.sh 20 echo "-------------------------------------------------" 21 echo "Please check the result and remove $1.$TIMESTAMP." 22 fi