Fix environment variables generation when using symlinks
Issue
@@ -20,11 +20,10 @@ fi
SCRIPT_DIR="$(cd "$(dirname "${SCRIPT_PATH}")" >/dev/null 2>&1 && pwd)"
if [ ! -L "${SCRIPT_DIR}" ]; then
- GPDB_DIR=$(basename "${SCRIPT_DIR}")
+ GPHOME=${SCRIPT_DIR}
else
- GPDB_DIR=$(basename "$(readlink "${SCRIPT_DIR}")")
+ GPHOME=$(readlink "${SCRIPT_DIR}")
fi
-GPHOME=$(dirname "${SCRIPT_DIR}")/"${GPDB_DIR}"
EOF
cat <<"EOF"
