Skip to content

Commit ae4fa34

Browse files
author
Genuchten
committed
remove shopt&alias to make it work on powershell
syntax: bash geopython-workshop-ctl.sh start
1 parent 1f1a37b commit ae4fa34

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

Diff for: workshop/geopython-workshop-ctl.sh

+3-23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
shopt -s expand_aliases
4-
53
PROGRAM_NAME=$(basename $0)
64

75
USAGE="Usage: $PROGRAM_NAME <start|stop|url|update|clean>"
@@ -11,31 +9,13 @@ if [ "$#" -ne 1 ]; then
119
exit 1
1210
fi
1311

14-
# Sniff which Docker Compose variant is installed
15-
# and set an alias.
16-
# See https://github.com/geopython/geopython-workshop/issues/82
17-
if command docker-compose --version &> /dev/null
18-
then
19-
alias dockercompose='docker-compose'
20-
echo "Using docker-compose"
21-
else
22-
if !command docker compose version &> /dev/null
23-
then
24-
echo "Neither docker-compose nor docker compose is available"
25-
echo "Check your Docker Installation"
26-
exit 1
27-
fi
28-
alias dockercompose='docker compose'
29-
echo "Using docker compose"
30-
fi
31-
3212
# Test for the command
3313
if [ $1 == "start" ]; then
3414
$0 stop
35-
dockercompose up -d
15+
docker compose up -d
3616
elif [ $1 == "stop" ]; then
37-
dockercompose stop
38-
dockercompose rm --force
17+
docker compose stop
18+
docker compose rm --force
3919
elif [ $1 == "url" ]; then
4020
# try to open the Jupyter Notebook in Browser
4121
platform="$(uname | tr '[:upper:]' '[:lower:]')"

0 commit comments

Comments
 (0)