@@ -5,13 +5,13 @@ set -o pipefail
55
66# wrapper script for cloud_sql_proxy program
77
8- # By using this entrypoint script in the docker image it provides a much
9- # simplier method of running the proxy. Instead of having to specify the
8+ # By using this entrypoint script in the docker image it provides a much
9+ # simpler method of running the proxy. Instead of having to specify the
1010# exact sqlproxy command via the CMD or run - you are able to just set
1111# environment variables for the various settings
1212#
13- # This script assumes you will be using a service account as authenticaiton
14- # either by mounting the sevice account json into the docker container or
13+ # This script assumes you will be using a service account as authentication
14+ # either by mounting the service account json into the docker container or
1515# setting the appropriate role on the default service account
1616
1717MISSING=" "
@@ -79,7 +79,7 @@ eval set -- "$TEMP"
7979while true ; do
8080 case " $1 " in
8181 -v|--version)
82- version
82+ version
8383 exit 1
8484 ;;
8585 -h|--help)
@@ -123,14 +123,14 @@ then
123123 echo
124124 for miss in ${MISSING}
125125 do
126- case $miss in
126+ case $miss in
127127 " GOOGLE_PROJECT" ) echo " GOOGLE_PROJECT: Google project name that CloudSQL instance resides"
128128 ;;
129129 " CLOUDSQL_ZONE" ) echo " CLOUDSQL_ZONE: Google zone that instance resides in (us-central1-a, us-east1-b,..."
130130 ;;
131131 " CLOUDSQL_INSTANCE" ) echo " CLOUDSQL_INSTANCE: Specific name of the CLoudSQL instance"
132132 ;;
133- esac
133+ esac
134134 done
135135 usage
136136 echo ; echo " Exitting!"
@@ -141,17 +141,17 @@ then
141141 CLOUDSQL_CONNECTION_LIST=" ${GOOGLE_PROJECT} :${CLOUDSQL_ZONE} :${CLOUDSQL_INSTANCE} =tcp:0.0.0.0:${PORT} "
142142
143143fi
144-
144+
145145# determine what credentials will be used if flag not set then use a service
146146# account json file.
147147if [ " ${CLOUDSQL_USE_DEFAULT_CREDENTIALS} " -eq " 0" ]
148148then
149- if [ -r ${CLOUDSQL_CREDENTIAL_FILE} ]
149+ if [ -f ${CLOUDSQL_CREDENTIAL_FILE} ]
150150 then
151151 CREDENTIALS=" -credential_file=${CLOUDSQL_CREDENTIAL_FILE} "
152152 else
153- echo " Unable to read credential file: (${CLOUDSQL_CREDENTIAL_FILE} )! - Exitting "
154- echo
153+ echo " Unable to read credential file: (${CLOUDSQL_CREDENTIAL_FILE} )! - Exiting "
154+ echo
155155 exit 1
156156 fi
157157fi
0 commit comments