
bus_id="{{ pwr_bus_id }}"
if [ -e {{ base_directory }}/etc/proview.cnf ]; then
  bus_id=`eval cat {{ base_directory }}/etc/proview.cnf | grep "\\bqcomBusId\\b" | awk '{print $2}'`
fi
if [ -e {{ base_directory }}/etc/proview.cnf ]; then
  web_dir=`eval cat {{ base_directory }}/etc/proview.cnf | grep "\\bwebDirectory\\b" | awk '{print $2}'`
fi

export PWR_BUS_ID=$bus_id

export pwrb_root={{ pwr_exp_dir }}
export pwrp_root={{ base_directory }}/pwrp

export pwr_exe=$pwrb_root/exe
export pwr_lib=$pwrb_root/lib
export pwr_obj=$pwrb_root/obj
export pwr_inc=$pwrb_root/inc
export pwr_load=$pwrb_root/load
export pwr_lis=$pwrb_root/lis
export pwr_doc=$pwrb_root/doc

export pwrp_exe=$pwrp_root/x86_64_linux/exe
export pwrp_lib=$pwrp_root/x86_64_linux/lib
export pwrp_obj=$pwrp_root/x86_64_linux/obj
export pwrp_lis=$pwrp_root/x86_64_linux/lis
export pwrp_inc=$pwrp_root/common/inc
export pwrp_load=$pwrp_root/common/load
export pwrp_log=$pwrp_root/common/log
export pwrp_db=$pwrp_root/common/db
export pwrp_web=$web_dir

export pwra_db={{ pwra_db }}

export jdk={{ java_location }}
export JAVA_HOME={{ java_location }}
export jdk_home={{ java_location }}/bin

PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home

#symbols to define start/stop commands for PWR
alias pwr_stop='{{ base_directory }}/bin/pwrrt stop'
alias pwr_stop.sh="{{ base_directory }}/bin/pwrrt stop"
alias pwr_start="{{ base_directory }}/bin/pwrrt start"
alias pwr="{{ base_directory }}/bin/pwrrt"

if [ -e $pwrp_exe/profile ]; then
  source $pwrp_exe/profile
fi
