#!/bin/sh

unzip wazilla-jlp.zip

cd mozilla
patch -p0 < ../wazilla.diff
cp ../images/*.gif themes/modern/communicator/brand
cp ../images/splash.xpm xpfe/bootstrap
cp ../images/logo.gif xpfe/global/resource/content

cp ../.mozconfig .
MOZILLA_OFFICIAL=1
export MOZILLA_OFFICIAL
BUILD_OFFICIAL=1
export BUILD_OFFICIAL
gmake -f client.mk build

cp -r ../wazjlp/* dist/bin
cp ../lofi.jar dist/bin/chrome
cp ../installed-chrome.txt dist/bin/chrome

cd ..
rm -fr wazjlp
rm -fr images
rm -f wazilla-jlp.zip
rm -f lofi.jar
rm -f installed-chrome.txt
rm -f .mozconfig
rm -f wazilla.diff

