#!/bin/sh

set -x

Pkg="$1"
if test -e "$Pkg"
then
   chmod -R 755 "$Pkg"
   rm -rf "$Pkg"/*
fi

ostarget=`expr "$CONFIGURATION" : "^.*-\(10\..*\)"`
App=${Pkg}/Applications
mkdir -p ${App}
##########################################
# FrontBase manager
##########################################

( cd ${TARGET_BUILD_DIR}; tar cf - FrontBaseManager.app ) | (cd ${App}; tar xf - )

/bin/chmod  555  ${App}
/bin/chmod  555  ${App}/FrontBaseManager.app

/usr/sbin/chown -R root  ${App}
/usr/bin/chgrp  -R admin ${App}

##########################################
# Unicode manager
##########################################

( cd ${TARGET_BUILD_DIR}; tar cf - FBUnicodeManager.app ) | (cd ${App}; tar xf - )

/bin/chmod  555  ${App}
/bin/chmod  555  ${App}/FBUnicodeManager.app

/usr/sbin/chown -R root  ${App}
/usr/bin/chgrp  -R admin ${App}

