#!/bin/sh

mkdir temp1

#apply customizations:
. ../CUSTOMIZE
if [ "$PUP_TOOLS_DISTRO_ONE_NAME" ];then
 namePTN="s%Quirky%${PUP_TOOLS_DISTRO_ONE_NAME}%"
 sed -i -e "$namePTN" welcome1stboot.bac
fi
if [ "$PUP_TOOLS_DISTRO_96_LOGO" ];then
 logoPTN='s%quirky96\.png%'"${PUP_TOOLS_DISTRO_96_LOGO}%"
 sed -i -e "$logoPTN" welcome1stboot.bac
fi

#this links with /usr/lib/hug.so.
#the -x option will create welcome1stboot.pot
bacon -x -d temp1 welcome1stboot.bac
[ ! -f temp1/welcome1stboot ] && exit 1
mv temp1/welcome1stboot ./
strip --strip-unneeded welcome1stboot

bacon -d temp1 debdb2pupdb.bac
[ ! -f temp1/debdb2pupdb ] && exit 2
mv temp1/debdb2pupdb ./
strip --strip-unneeded debdb2pupdb

bacon -d temp1 find_cat.bac
[ ! -f temp1/find_cat ] && exit 3
mv temp1/find_cat ./
strip --strip-unneeded find_cat

bacon -d temp1 pngoverlay.bac
[ ! -f temp1/pngoverlay ] && exit 4
mv temp1/pngoverlay ./
strip --strip-unneeded pngoverlay

bacon -d temp1 popup.bac
[ ! -f temp1/popup ] && exit 5
mv temp1/popup ./
strip --strip-unneeded popup

#this has a .pot file:
bacon -x -d temp1 proxy-setup.bac
[ ! -f temp1/proxy-setup ] && exit 6
mv temp1/proxy-setup ./
strip --strip-unneeded proxy-setup

bacon -d temp1 pup_event_frontend_d.bac
[ ! -f temp1/pup_event_frontend_d ] && exit 7
mv temp1/pup_event_frontend_d ./
strip --strip-unneeded pup_event_frontend_d

bacon -d temp1 pup_event_ipc.bac
[ ! -f temp1/pup_event_ipc ] && exit 8
mv temp1/pup_event_ipc ./
strip --strip-unneeded pup_event_ipc


#install
#will do this in T2 pup-tools.conf

