File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
appengine/standard/wordpress Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,16 @@ DB_PASS is the root password to set for the instance.
2424"
2525fi
2626
27+ set -u
28+ set -o pipefail
29+
2730log=$( mktemp)
2831
29- db_conn_name=$( gcloud sql instances describe $db_instance \
30- | grep connectionName \
31- | sed ' s/connectionName: //' )
32+ instances=$( mktemp)
33+ gcloud sql instances describe $db_instance 2> $log > $instances \
34+ || die " Failed to get description of Cloud SQL instance $db_instance : $( cat $log ) "
35+ db_conn_name=$( grep connectionName $instances | sed ' s/connectionName: //' )
36+ if [[ $? != 0 ]]; then die " Failed to find connectionName in instance description." ; fi
3237db_host=" :/cloudsql/$db_conn_name "
3338echo " \
3439<?php
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ tar xzvf wordpress.tar.gz &>$log || die "Failed to untar wordpress tarball: $(ta
1616curl -L https://github.com/wpCloud/wp-stateless/archive/2.1.1.tar.gz 2> $log > wp-stateless.tar.gz \
1717 || die " Failed to fetch wp-stateless plugin: $( cat $log ) "
1818tar xzvf wp-stateless.tar.gz & > $log || die " Failed to untar wp-stateless tarball: $( tail $log ) "
19- mv wp-stateless-2.1.1 wordpress/wp-content/plugins & > $log \
20- || die " Failed to move wp-stateless plugin into place: $( cat $log ) "
19+ rsync wp-stateless-2.1.1 wordpress/wp-content/plugins & > $log \
20+ || die " Failed to copy wp-stateless plugin into place: $( cat $log ) "
2121cd wordpress || die " Failed to cd into wordpress."
2222# Force WordPress not to prepend ABSPATH to UPLOADS since we have
2323# defined UPLOADS to be an absolute path: /tmp.
You can’t perform that action at this time.
0 commit comments