forked from all-of-us/raw-data-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjupyter.sh
executable file
·40 lines (36 loc) · 858 Bytes
/
jupyter.sh
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
36
37
38
39
40
#!/bin/bash -e
# Checks that questionnaire response answers in the database match those in a specified CSV
# file.
USAGE="tools/check_ppi_data.sh [--account <ACCOUNT> --project <PROJECT> [--creds_account <ACCOUNT>]]"
while true; do
case "$1" in
--account) ACCOUNT=$2; shift 2;;
--creds_account) CREDS_ACCOUNT=$2; shift 2;;
--project) PROJECT=$2; shift 2;;
--file) FILE=$2; shift 2;;
-- ) shift; break ;;
* ) break ;;
esac
done
if [ "${PROJECT}" ]
then
if [ -z "${ACCOUNT}" ]
then
echo "Usage: $USAGE"
exit 1
fi
if [ -z "${CREDS_ACCOUNT}" ]
then
CREDS_ACCOUNT="${ACCOUNT}"
fi
source tools/auth_setup.sh
run_cloud_sql_proxy
set_db_connection_string
else
if [ -z "${DB_CONNECTION_STRING}" ]
then
source tools/setup_local_vars.sh
set_local_db_connection_string
fi
fi
(jupyter notebook)