#!/bin/bash

. ./param_bash.ini

clear
if [ "${INST_TYPE}" = "DB_ONLY" ] ; then
    CANCEL "The installation type doesn't require third party products extraction" "$0"
fi
START "Installing $PRODUCT directory" "ikit_4_1"
if [ ! -w /etc/passwd ] && [ "$USER" != "$MAIN_USER" ] ; then
    ERROR "Please run the script as $MAIN_USER user or root user" "ikit_4_1"
fi

WAIT "Installing $PRODUCT"

bash ./extract_product.sh dps
if [ "$?" = "0" ] ; then
    chown -Rh $MAIN_USER:$GROUP $PRODUCT > /dev/null 2>&1
    chmod -R g+w $PRODUCT > /dev/null 2>&1
    DONE "The binary product package was extracted to the $PRODUCT" "ikit_4_1"
fi
