File tree Expand file tree Collapse file tree 2 files changed +24
-15
lines changed
Expand file tree Collapse file tree 2 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 1616LOG=" pgo-installer.log"
1717
1818export PGORELEASE=3.1
19+ PGO_RELEASE_REMOTE_URL=" https://github.com/CrunchyData/postgres-operator/releases/download/$PGORELEASE /postgres-operator.$PGORELEASE .tar.gz"
20+ PGO_RELEASE_LOCAL_PATH=" /tmp/postgres-operator.$PGORELEASE .tar.gz"
1921
2022echo " Testing for dependencies..." | tee -a $LOG
2123
2224which wget > /dev/null 2> /dev/null
2325if [[ $? -ne 0 ]]; then
24- echo " The required dependency wget is missing on your system." | tee -a $LOG
25- exit 1
26+ which curl > /dev/null 2> /dev/null
27+ if [[ $? -ne 0 ]]; then
28+ echo " The required dependency wget and/or curl is missing on your system." | tee -a $LOG
29+ exit 1
30+ else
31+ PGO_HTTP_CMD=" curl -L -s -o ${PGO_RELEASE_LOCAL_PATH} ${PGO_RELEASE_REMOTE_URL} "
32+ fi
33+ else
34+ PGO_HTTP_CMD=" wget --quiet ${PGO_RELEASE_REMOTE_URL} -O ${PGO_RELEASE_LOCAL_PATH} "
2635fi
2736which kubectl > /dev/null 2> /dev/null
2837if [[ $? -ne 0 ]]; then
@@ -83,11 +92,7 @@ mkdir -p $GOPATH/src/github.com/crunchydata/postgres-operator
8392
8493echo " "
8594echo " Installing pgo server configuration..." | tee -a $LOG
86- wget --quiet https://github.com/CrunchyData/postgres-operator/releases/download/$PGORELEASE /postgres-operator.$PGORELEASE .tar.gz -O /tmp/postgres-operator.$PGORELEASE .tar.gz
87- if [[ $? -ne 0 ]]; then
88- echo " ERROR: Problem getting the pgo server configuration."
89- exit 1
90- fi
95+ ` ${PGO_HTTP_CMD} `
9196
9297cd $COROOT
9398tar xzf /tmp/postgres-operator.$PGORELEASE .tar.gz
Original file line number Diff line number Diff line change 1616LOG=" pgo-installer.log"
1717
1818export PGORELEASE=3.1
19+ PGO_RELEASE_REMOTE_URL=" https://github.com/CrunchyData/postgres-operator/releases/download/$PGORELEASE /postgres-operator.$PGORELEASE .tar.gz"
20+ PGO_RELEASE_LOCAL_PATH=" /tmp/postgres-operator.$PGORELEASE .tar.gz"
1921
2022echo " Testing for dependencies..." | tee -a $LOG
2123
2224which wget > /dev/null 2> /dev/null
2325if [[ $? -ne 0 ]]; then
24- echo " The required dependency wget is missing on your system." | tee -a $LOG
25- exit 1
26- fi
27- which oc > /dev/null 2> /dev/null
28- if [[ $? -ne 0 ]]; then
29- echo " The required dependency oc is missing on your system." | tee -a $LOG
30- exit 1
26+ which curl > /dev/null 2> /dev/null
27+ if [[ $? -ne 0 ]]; then
28+ echo " The required dependency wget and/or curl is missing on your system." | tee -a $LOG
29+ exit 1
30+ else
31+ PGO_HTTP_CMD=" curl -L -s -o ${PGO_RELEASE_LOCAL_PATH} ${PGO_RELEASE_REMOTE_URL} "
32+ fi
33+ else
34+ PGO_HTTP_CMD=" wget --quiet ${PGO_RELEASE_REMOTE_URL} -O ${PGO_RELEASE_LOCAL_PATH} "
3135fi
3236
3337echo " "
@@ -87,7 +91,7 @@ mkdir -p $GOPATH/src/github.com/crunchydata/postgres-operator
8791
8892echo " "
8993echo " Installing pgo server configuration..." | tee -a $LOG
90- wget --quiet https://github.com/CrunchyData/postgres-operator/releases/download/ $PGORELEASE /postgres-operator. $PGORELEASE .tar.gz -O /tmp/postgres-operator. $PGORELEASE .tar.gz
94+ ` ${PGO_HTTP_CMD} `
9195# if [[ $? -ne 0 ]]; then
9296# echo "problem getting pgo server config"
9397# exit 1
You can’t perform that action at this time.
0 commit comments