#!/bin/sh

installedchrometxt=$BASEDIR/SUNWns6/chrome/installed-chrome.txt
alllocalesrdf=$BASEDIR/SUNWns6/chrome/all-locales.rdf

# update installed-chrome.txt
if [ -f $installedchrometxt ] ; then
	diff $installedchrometxt $BASEDIR/SUNWns6/chrome/installed-chrome.txt.ko-KR | \
		grep '^<' | sed -e 's/^< //' > /tmp/$$installed-chrome.txt.new
	count=`cat /tmp/$$installed-chrome.txt.new | wc -l`
	if [ $count -eq 0 ]; then
		rm -r $installedchrometxt
	else
		cat /tmp/$$installed-chrome.txt.new > $installedchrometxt
	fi
	rm -f /tmp/$$installed-chrome.txt.new
fi

# update all-locales.rdf
/bin/rm -f $alllocalesrdf
LD_LIBRARY_PATH=$BASEDIR/SUNWns6:/$BASEDIR/SUNWns6/dist/lib
MOZILLA_FIVE_HOME=$BASEDIR/SUNWns6
export LD_LIBRARY_PATH MOZILLA_FIVE_HOME
$MOZILLA_FIVE_HOME/regchrome

exit 0
