From 9a80be65f0fe533a1c9c83263e40e286db2b2a83 Mon Sep 17 00:00:00 2001 From: Nathan Farrant-Diaz Date: Wed, 8 Jun 2016 10:47:29 -0400 Subject: [PATCH] testing more formatting --- scripts/apexupdate.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/apexupdate.sh b/scripts/apexupdate.sh index 7ba80e0..67b1178 100755 --- a/scripts/apexupdate.sh +++ b/scripts/apexupdate.sh @@ -4,54 +4,54 @@ # # This script is designed to be run from the top level directory of your project and will break otherwise -if [ -z "$ORACLE_HOME" ]; then +if [ -z "${ORACLE_HOME}" ]; then echo "Missing environment variable: ORACLE_HOME. Please add the path of your oracle installation to your environment variables under the variable name ORACLE_HOME"; exit 1 fi -if [ -z "$APEX_HOME" ]; then +if [ -z "${APEX_HOME}" ]; then echo "Missing environment variable: APEX_HOME. Please add the path of your apex installation to your environment variables under the variable name APEX_HOME. Note: You should be using APEX version 5 or above"; exit 1 fi -if [ ! -e $ORACLE_HOME/jdbc/lib/ojdbc6.jar ]; then - echo "Missing ojdbc6.jar: please download from oracle and put in $ORACLE_HOME/jdbc/lib directory"; exit 1 +if [ ! -e "${ORACLE_HOME}"/jdbc/lib/ojdbc6.jar ]; then + echo "Missing ojdbc6.jar: please download from oracle and put in ${ORACLE_HOME}/jdbc/lib directory"; exit 1 fi -if [ ! -e $APEX_HOME/utilities/oracle/apex/APEXExport.class ]; then +if [ ! -e "${APEX_HOME}"/utilities/oracle/apex/APEXExport.class ]; then echo "Missing APEXExport class. Please ensure you are using Apex 5 or above and have the APEXExport and APEXExportSplitter classes are in the $APEX_HOME/utilities/oracle/apex/ directory"; exit 1 fi -if [ ! -e $APEX_HOME/utilities/oracle/apex/APEXExportSplitter.class ]; then +if [ ! -e "${APEX_HOME}"/utilities/oracle/apex/APEXExportSplitter.class ]; then echo "Missing APEXExportSplitter class. Please ensure you are using Apex 5 or above and have the APEXExport and APEXExportSplitter classes are in the $APEX_HOME/utilities/oracle/apex/ directory"; exit 1 fi source ./config/asc.conf -export CLASSPATH=$APEX_HOME/utilities:$ORACLE_HOME/jdbc/lib/ojdbc6.jar +export CLASSPATH="${APEX_HOME}"/utilities:"${ORACLE_HOME}"/jdbc/lib/ojdbc6.jar -export_file=f$apexappid.sql +export_file="f${apexappid}.sql" if [ -d apex/ ]; then rm -r apex/ fi -if [ -e $export_file ]; then - rm $export_file +if [ -e "${export_file}" ]; then + rm "${export_file}" fi -java oracle.apex.APEXExport -db $database_connection -user $username -password $password -applicationid $apexappid -skipExportDate -expOriginalIds # +java oracle.apex.APEXExport -db "${database_connection}" -user "${username}" -password "${password}" -applicationid "${apexappid}" -skipExportDate -expOriginalIds # -if [ ! 0 -eq $? ]; then +if [ ! 0 -eq "$?" ]; then echo "Exit code #: $?. An error has occured while trying to use APEXExport. Please check that your database_connection, username, password, and apexappid variables are all set correctly."; exit 1 fi -java oracle.apex.APEXExportSplitter $export_file +java oracle.apex.APEXExportSplitter "${export_file}" -if [ ! 0 -eq $? ]; then +if [ ! 0 -eq "$?" ]; then echo "Exit code #: $?. An error has occured while trying to use APEXExportSplitter. Please check that your apexappid variable is set correctly and that the application exists in the workspace you are trying to export from"; exit 1 fi -rm $export_file +rm "${export_file}" -mv f$apexappid apex # +mv "f${apexappid}" apex # cd apex/