addlang.sh: Move input to backup after run.
And check for input file before starting. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
770e0eb2fd
commit
9c66269fce
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user