Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions script/oracle/install-instantclient-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ declare -a packages=(instantclient-sdk instantclient-odbc)

function install_pkg {
local package="$1"
local path="vendor/oracle"
local zip="${package}-${oracle_version}.zip"
local file="vendor/oracle/${zip}"
local file="$path/${zip}"
local existing_file="$path/${package}-"*".zip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brace expansions and globs are literal in assignments. Quote it or use an array. [shellcheck:2125]


if [ -f "${file}" ]; then
echo "[OK] ${file} already present"
if [ -f "${existing_file}" ]; then
echo "[OK] ${existing_file} already present"
file="${existing_file}"
else
echo "[INFO] Downloading ${zip} from Oracle servers"
wget "${oracle_otn}/${zip}" -O "${file}"
Expand Down