Skip to content

Commit b4311fa

Browse files
Merge pull request #151 from geoCML/fix-docs-bash
Update docs: install.sh should be run with bash, not sh
2 parents 89cfe72 + b7119fe commit b4311fa

2 files changed

Lines changed: 20 additions & 18 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ geoCML deployments are multi-paradigm, offering a desktop, server, and web GIS e
1818

1919
Before instantiating a geoCML deployment, you must have git (https://git-scm.com/downloads), Docker (https://www.docker.com/), and Docker Compose (https://docs.docker.com/compose/install/) installed on the machine you want to host geoCML on. You do not need any additional GIS software installed on the host machine. Once you have satisfied these conditions, please follow the following steps to deploy your geoCML instance.
2020

21-
- In your favorite terminal, run the following command: `sh <(curl https://raw.githubusercontent.com/geocml/geocml-base-deployment/main/install.sh)`
21+
- In your favorite terminal, run the following command: `bash <(curl https://raw.githubusercontent.com/geocml/geocml-base-deployment/main/install.sh)`
2222
- Follow the on-screen prompts to configure and deploy a geoCML instance to your machine.
2323

2424
That's it! You can access geoCML Desktop via {deployment host URL}:10000 or geoCML Server Portal via {deployment host URL}:80 using a web browser. Further configuration steps for each of these services are discussed in our documentation (https://geocml.github.io/docs/).

install.sh

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
VERSION=v4.0
24
DOCKER_COMPOSE_PATH=$(dirname $(find $(pwd) -name "docker-compose.yml"))
35

@@ -30,7 +32,7 @@ echo "Welcome to geoCML $VERSION!"
3032

3133
if [ "$GEOCML_DEPLOYMENT_NAME" == "" ]
3234
then
33-
echo "\nPlease enter the name you want to use to for this deployment."
35+
printf "\nPlease enter the name you want to use to for this deployment.\n"
3436
echo "(This will create a folder for your geoCML deployment at $HOME)"
3537
read GEOCML_DEPLOYMENT_NAME
3638
export GEOCML_DEPLOYMENT_NAME=$GEOCML_DEPLOYMENT_NAME
@@ -47,7 +49,7 @@ fi
4749

4850
if [ "$GEOCML_DESKTOP_PASSWORD" == "" ]
4951
then
50-
echo "\nPlease enter the password you want to use to access geoCML Desktop."
52+
printf "\nPlease enter the password you want to use to access geoCML Desktop.\n"
5153
read GEOCML_DESKTOP_PASSWORD
5254
export GEOCML_DESKTOP_PASSWORD=$GEOCML_DESKTOP_PASSWORD
5355
touch ~/.bashrc &> /dev/null
@@ -62,7 +64,7 @@ fi
6264

6365
if [ "$GEOCML_POSTGRES_ADMIN_PASSWORD" == "" ]
6466
then
65-
echo "\nPlease enter the administrator password you want to use to access geoCML Postgres."
67+
printf "\nPlease enter the administrator password you want to use to access geoCML Postgres.\n"
6668
read GEOCML_POSTGRES_ADMIN_PASSWORD
6769
export GEOCML_POSTGRES_ADMIN_PASSWORD=$GEOCML_POSTGRES_ADMIN_PASSWORD
6870
touch ~/.bashrc &> /dev/null
@@ -77,7 +79,7 @@ fi
7779

7880
if [ "$GEOCML_POSTGRES_PASSWORD" == "" ]
7981
then
80-
echo "\nPlease enter the password you want to use to access geoCML Postgres with user 'geocml'."
82+
printf "\nPlease enter the password you want to use to access geoCML Postgres with user 'geocml'.\n"
8183
read GEOCML_POSTGRES_PASSWORD
8284
export GEOCML_POSTGRES_PASSWORD=$GEOCML_POSTGRES_PASSWORD
8385
touch ~/.bashrc &> /dev/null
@@ -92,7 +94,7 @@ fi
9294

9395
if [ "$GEOCML_POSTGRES_PORT" == "" ]
9496
then
95-
echo "\nPlease enter the port you want to use to access geoCML Postgres."
97+
printf "\nPlease enter the port you want to use to access geoCML Postgres.\n"
9698
read GEOCML_POSTGRES_PORT
9799
export GEOCML_POSTGRES_PORT=$GEOCML_POSTGRES_PORT
98100
touch ~/.bashrc &> /dev/null
@@ -107,7 +109,7 @@ fi
107109

108110
if [ "$GEOCML_DESKTOP_PORT" == "" ]
109111
then
110-
echo "\nPlease enter the port you want to use to access geoCML Desktop."
112+
printf "\nPlease enter the port you want to use to access geoCML Desktop.\n"
111113
read GEOCML_DESKTOP_PORT
112114
export GEOCML_DESKTOP_PORT=$GEOCML_DESKTOP_PORT
113115
touch ~/.bashrc &> /dev/null
@@ -122,7 +124,7 @@ fi
122124

123125
if [ "$GEOCML_SERVER_PORT" == "" ]
124126
then
125-
echo "\nPlease enter the port you want to use to access geoCML Server."
127+
printf "\nPlease enter the port you want to use to access geoCML Server.\n"
126128
read GEOCML_SERVER_PORT
127129
export GEOCML_SERVER_PORT=$GEOCML_SERVER_PORT
128130
touch ~/.bashrc &> /dev/null
@@ -137,7 +139,7 @@ fi
137139

138140
if [ "$GEOCML_NETWORK_NAME" == "" ]
139141
then
140-
echo "\nPlease enter the name you want to use for the geoCML network."
142+
printf "\nPlease enter the name you want to use for the geoCML network.\n"
141143
read GEOCML_NETWORK_NAME
142144
export GEOCML_NETWORK_NAME=$GEOCML_NETWORK_NAME
143145
touch ~/.bashrc &> /dev/null
@@ -153,7 +155,7 @@ fi
153155

154156
if [ "$GEOCML_INSTALLATION_METHOD" == "" ]
155157
then
156-
echo "\nPlease select how you want to install geoCML to this machine."
158+
printf "\nPlease select how you want to install geoCML to this machine.\n"
157159
echo "1) Pull Docker image from GHCR (recommended)"
158160
echo "2) Build Docker image locally from source"
159161
read GEOCML_INSTALLATION_METHOD
@@ -163,7 +165,7 @@ fi
163165
mkdir ~/$GEOCML_DEPLOYMENT_NAME &> /dev/null
164166
if [ $? -ne 0 ]
165167
then
166-
echo "\n[ERROR]: ~/$GEOCML_DEPLOYMENT_NAME is not empty."
168+
printf "\n[ERROR]: ~/$GEOCML_DEPLOYMENT_NAME is not empty.\n"
167169
echo "Can I delete the directory at $HOME/$GEOCML_DEPLOYMENT_NAME?"
168170
echo "(yes/no)"
169171
read RM_PROJECT_DIR
@@ -184,8 +186,8 @@ mkdir /tmp/geocml/logs &> /dev/null
184186

185187
if [ "$DOCKER_COMPOSE_PATH" == "" ]
186188
then
187-
echo "\n[WARN]: It looks like this install script was run outside of the geoCML Base Deployment repository..."
188-
echo "\n[INFO]: Cloning into /tmp/geocml-base-deployment."
189+
printf "\n[WARN]: It looks like this install script was run outside of the geoCML Base Deployment repository...\n"
190+
printf "\n[INFO]: Cloning into /tmp/geocml-base-deployment.\n"
189191
git clone https://github.com/geoCML/geocml-base-deployment.git /tmp/geocml/geocml-base-deployment/ &> /tmp/geocml/logs/build.log
190192
cd /tmp/geocml/geocml-base-deployment/ &> /tmp/geocml/logs/build.log
191193
git fetch --tags --all &> /tmp/geocml/logs/build.log
@@ -199,21 +201,21 @@ cd ~/$GEOCML_DEPLOYMENT_NAME/ &> /tmp/geocml/logs/build.log
199201
if [ "$GEOCML_INSTALLATION_METHOD" == "1" ]
200202
then
201203
echo "Okay, geoCML will be installed by pulling the Docker image from GHCR."
202-
echo "\n[INFO]: Pulling geoCML..."
204+
printf "\n[INFO]: Pulling geoCML...\n"
203205

204206
spinner &
205207
spinner_pid=$!
206208
docker compose pull &> /tmp/geocml/logs/build.log
207-
echo "\n[INFO]: Finished pulling containers from GHCR."
209+
printf "\n[INFO]: Finished pulling containers from GHCR.\n"
208210
elif [ "$GEOCML_INSTALLATION_METHOD" == "2" ]
209211
then
210212
echo "Okay, geoCML will be installed by building the containers locally from source."
211-
echo "\n[INFO]: Building geoCML..."
213+
printf "\n[INFO]: Building geoCML...\n"
212214

213215
spinner &
214216
spinner_pid=$!
215217
docker compose build &> /tmp/geocml/logs/build.log
216-
echo "\n[INFO]: Finished building."
218+
printf "\n[INFO]: Finished building.\n"
217219
else
218220
echo "No idea what $GEOCML_INSTALLATION_METHOD means! Please provide a valid installation method (1, 2). Exiting."
219221
kill $spinner_pid
@@ -230,6 +232,6 @@ docker compose down &> /tmp/geocml/logs/start.log
230232
docker compose up -d --wait &> /tmp/geocml/logs/start.log
231233
kill $spinner_pid
232234
wait $spinner_pid 2>/dev/null
233-
echo "\n[INFO]: Finished startup."
235+
printf "\n[INFO]: Finished startup.\n"
234236
echo "[INFO]: Check /tmp/logs/geocml/start.log for additional information about your deployment!"
235237
exit 0

0 commit comments

Comments
 (0)