#This script is a wrapper of i.asenv, provides the list of input
#and output files to i.asenv which does the token replacements.
export INSTALL_DIR=$1
export CLIENT_BASEDIR=$2
export ASINSTDIR=$3
export ASJAVADIR=$4
export ASCONFIG_HOME=$CLIENT_BASEDIR/config

echo "ASCONFIG_HOME = $ASCONFIG_HOME"
echo "CLIENT_BASEDIR = $CLIENT_BASEDIR"

cat $INSTALL_DIR/install/filelista |sh $INSTALL_DIR/install/i.asenv
for i in `cut -d" " -f2 $INSTALL_DIR/install/filelista`
do
    chmod 755 $i
done
