version=`cat $1 | grep "\"VERSION\"" | awk -F '"' '{print $4}'`
if [[ "${version/V/}" != "$version" ]]; then
version=`echo $version | awk -F 'V' '{print $2}'`
mntLgPath="/mnt/packages/languages"
mkdir -p /tmp/download/certificate
mkdir -p /tmp/download/log
mkdir -p /tmp/download/configuration
if [ ! -d /mnt/packages/languages ]; then
mkdir -p /mnt/packages/languages
cp -rf ${fwLgPath}/* ${mntLgPath}
list="English Spanish Frensh German Itailian"
if [ -f ${fwLgPath}/${i}.js ]; then
if [ -f ${mntLgPath}/${i}.js ]; then
tmp_version=`cat ${mntLgPath}/${i}.js | grep "\"VERSION\"" | awk -F '"' '{print $4}'`
fw_version=$(get_version ${fwLgPath}/${i}.js)
mnt_version=$(get_version ${mntLgPath}/${i}.js)
if [[ "${tmp_version/V/}" != "$tmp_version" ]]; then
cp -f ${fwLgPath}/${i}.js ${mntLgPath}/${i}.js
elif ! version_gt $mnt_version $fw_version; then
cp -f ${fwLgPath}/${i}.js ${mntLgPath}/${i}.js
cp ${fwLgPath}/${i}.js ${mntLgPath}/${i}.js
/etc/scripts/mini_httpd/mini_httpd.sh start
/etc/scripts/mini_httpd/mini_httpd.sh stop
/etc/scripts/mini_httpd/mini_httpd.sh reload