mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Fix linking when oracle's infra randomly resolves to different versions of client and sdk
This commit is contained in:
parent
2fdb2200a0
commit
9149639a33
@ -9,8 +9,8 @@ add_license_log() {
|
|||||||
|
|
||||||
# Function to install instantclient and SDK.
|
# Function to install instantclient and SDK.
|
||||||
add_client() {
|
add_client() {
|
||||||
sudo mkdir -p -m 777 "$oracle_home"
|
|
||||||
if [ ! -e "$oracle_client" ]; then
|
if [ ! -e "$oracle_client" ]; then
|
||||||
|
sudo mkdir -p -m 777 "$oracle_home" "$oracle_client"
|
||||||
for package in basiclite sdk; do
|
for package in basiclite sdk; do
|
||||||
if [ "$os" = 'Linux' ]; then
|
if [ "$os" = 'Linux' ]; then
|
||||||
libs='/usr/lib/'
|
libs='/usr/lib/'
|
||||||
@ -24,10 +24,12 @@ add_client() {
|
|||||||
lib_ext='dylib'
|
lib_ext='dylib'
|
||||||
fi
|
fi
|
||||||
get -q -n "/opt/oracle/$package.zip" "https://download.oracle.com/otn_software/$os_name/instantclient/instantclient-$package-$arch.zip"
|
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
|
done
|
||||||
sudo ln -sf /opt/oracle/instantclient*/*.$lib_ext* $libs
|
for icdir in /opt/oracle/instantclient_*; do
|
||||||
sudo ln -sf /opt/oracle/instantclient* "$oracle_client"
|
sudo mv "$icdir"/* "$oracle_client"/
|
||||||
|
done
|
||||||
|
sudo ln -sf /opt/oracle/instantclient/*.$lib_ext* $libs
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user