forked from utPLSQL/utPLSQL-java-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_utplsql.sh
More file actions
35 lines (29 loc) · 1.24 KB
/
install_utplsql.sh
File metadata and controls
35 lines (29 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -ev
cd $(dirname $(readlink -f $0))
# Download the specified version of utPLSQL.
# UTPLSQL_VERSION="v3.0.0-beta"
# UTPLSQL_FILE="utPLSQLv3.0.0.562-beta"
# curl -L -O "https://github.com/utPLSQL/utPLSQL/releases/download/$UTPLSQL_VERSION/$UTPLSQL_FILE.tar.gz"
# Download develop branch of utPLSQL.
UTPLSQL_VERSION="develop"
UTPLSQL_FILE="utPLSQL"
git clone -b develop --single-branch https://github.com/utPLSQL/utPLSQL.git
# tar -czf $UTPLSQL_FILE.tar.gz $UTPLSQL_FILE && rm -rf $UTPLSQL_FILE
# Create a temporary install script.
cat > install.sh.tmp <<EOF
# tar -xzf $UTPLSQL_FILE.tar.gz && rm $UTPLSQL_FILE.tar.gz
cd /$UTPLSQL_FILE/source
sqlplus -S -L sys/oracle@//127.0.0.1:1521/xe AS SYSDBA @install_headless.sql
EOF
# Copy utPLSQL files to the container and install it.
# docker cp ./$UTPLSQL_FILE.tar.gz $ORACLE_VERSION:/$UTPLSQL_FILE.tar.gz
docker cp ./$UTPLSQL_FILE $ORACLE_VERSION:/$UTPLSQL_FILE
docker cp ./install.sh.tmp $ORACLE_VERSION:/install.sh
docker cp ./create_api_user.sh $ORACLE_VERSION:/create_api_user.sh
# Remove temporary files.
# rm $UTPLSQL_FILE.tar.gz
rm install.sh.tmp
# Execute the utPLSQL installation inside the container.
docker exec $ORACLE_VERSION bash install.sh
docker exec $ORACLE_VERSION bash create_api_user.sh