#!/bin/sh

OUTPUT_DIR=/mnt/sysfs/system/zoneinfo
INPUTDIR_DIR=/usr/etc/zoneinfo

FILES="africa antarctica asia australasia europe northamerica southamerica pacificnew etcetera backward systemv factory solar87 solar88 solar89"
YEARISTYPE="yearistype"

#we don't have the tool to validate the integrity of the database
rm -rf ${OUTPUT_DIR}

#generate the timezone data base
mkdir -p ${OUTPUT_DIR}

DATA_FILES=""

for i in ${FILES}; do
   DATA_FILES="${DATA_FILES} ${INPUTDIR_DIR}/${i}";
done

# we ignore leap seconds
${INPUTDIR_DIR}/zic -y ${INPUTDIR_DIR}/${YEARISTYPE} -d ${OUTPUT_DIR} -L /dev/null ${DATA_FILES} || exit 1
