forked from gigawhitlocks/spacemaracas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
maracas
executable file
·56 lines (46 loc) · 1.14 KB
/
maracas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
usage=$(cat <<EOF
Spacemaracas - the beginnings of a vnc emacs thing with lazy documentation
Usage: $0 command location
Commands:
$0 run -- just run the thing. Will pull images if they are not built.
$0 stop -- stop the running application
$0 build -- Build images from source (more recent, less stable)
$0 clean -- Delete the Docker containers left around after running
$0 help -- Display this help screen
$0 vnc-only -- only run emacs+vnc. Good for local use where browser functionality not needed. Server/local ignored; stop when done with docker kill
Location:
server or local
Examples:
./maracas build local
./maracas run server
./maracas vnc-only
EOF
)
case "$2" in
server) cd server
;;
*) cd local
;;
esac
if test $# -eq 0; then
echo "$usage"
exit 1
fi
case "$1" in
build) ./build.sh
;;
run) ./run.sh
;;
stop) ./clean.sh
;;
publish) ./publish.sh
;;
vnc-only) docker run -d --name some-emacs -p 5900:5900 gigawhitlocks/emacs:latest
docker ps
;;
*) echo "$usage"
exit 1
;;
esac
exit 0