Skip to content

Commit

Permalink
Fix linking when oracle's infra randomly resolves to different versio…
Browse files Browse the repository at this point in the history
…ns of client and sdk
  • Loading branch information
shivammathur committed Apr 28, 2021
1 parent 2fdb220 commit 9149639
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/scripts/ext/oci.sh
Expand Up @@ -9,8 +9,8 @@ add_license_log() {

# Function to install instantclient and SDK.
add_client() {
sudo mkdir -p -m 777 "$oracle_home"
if [ ! -e "$oracle_client" ]; then
sudo mkdir -p -m 777 "$oracle_home" "$oracle_client"
for package in basiclite sdk; do
if [ "$os" = 'Linux' ]; then
libs='/usr/lib/'
Expand All @@ -24,10 +24,12 @@ add_client() {
lib_ext='dylib'
fi
get -q -n "/opt/oracle/$package.zip" "https://download.oracle.com/otn_software/$os_name/instantclient/instantclient-$package-$arch.zip"
unzip "/opt/oracle/$package.zip" -d "$oracle_home"
unzip -o "/opt/oracle/$package.zip" -d "$oracle_home"
done
sudo ln -sf /opt/oracle/instantclient*/*.$lib_ext* $libs
sudo ln -sf /opt/oracle/instantclient* "$oracle_client"
for icdir in /opt/oracle/instantclient_*; do
sudo mv "$icdir"/* "$oracle_client"/
done
sudo ln -sf /opt/oracle/instantclient/*.$lib_ext* $libs
fi
}

Expand Down

0 comments on commit 9149639

Please sign in to comment.