2010-03-22 16:32:16 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# This script check for currently implemented ENGLISH help files and detect missing help files in other languages (passed as command line parameter)
|
|
|
|
|
|
|
|
if [ -z "$1" ]
|
|
|
|
then
|
|
|
|
echo "Check missing help files. Needed language code for search"
|
|
|
|
echo "For example: es "
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "include/help/en" ]
|
|
|
|
then
|
|
|
|
echo "I need to run in Pandora FMS Console root directory"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir "/tmp/$1" >> /dev/null 2> /dev/null
|
|
|
|
for a in `ls include/help/en`
|
|
|
|
do
|
2010-04-20 04:20:10 +02:00
|
|
|
ESTA=`find include/help/$1/$a 2> /dev/null | wc -l`
|
2012-10-09 17:51:33 +02:00
|
|
|
if [ $ESTA == 0 ]
|
2010-03-22 16:32:16 +01:00
|
|
|
then
|
|
|
|
echo "Missing $a, and copying to /tmp/$1"
|
|
|
|
cp include/help/en/$a "/tmp/$1"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|