#
# postinstall script for rpm scriptlet
#
# This creates the two profile files for sqlcl for sh and csh
echo 'export SQLCL_HOME=/opt/oracle/sqlcl' > '/etc/profile.d/sqlcl.sh' && \
echo 'export PATH=$SQLCL_HOME/bin:$PATH' >> '/etc/profile.d/sqlcl.sh' && \
chmod 644 '/etc/profile.d/sqlcl.sh' \
# Create a C-Shell profile for sqlcl \
echo 'set SQLCL_HOME=/opt/oracle/sqlcl' > '/etc/profile.d/sqlcl.csh' && \
echo 'set PATH=$SQLCL_HOME/bin:$PATH' >> '/etc/profile.d/sqlcl.csh' && \
chmod 644 '/etc/profile.d/sqlcl.csh' 
if [[ ! -L '/usr/bin/sql' ]] ; then 
  ln -s '/opt/oracle/sqlcl/bin/sql' '/usr/bin/sql';
fi