-
Notifications
You must be signed in to change notification settings - Fork 5
/
fireplace.sh
executable file
·88 lines (81 loc) · 1.38 KB
/
fireplace.sh
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
echo 'Copyright (C) 2008-2009 Mario Danic <mario.danic@gmail.com>'
echo 'Ramaze stack is copyright (c) 2008-2009 Pistos'
echo "Welcome to Webby's fireplace"
echo 'This tiny script is a wrapper around various'
echo 'provided server deployment scripts.'
help () {
echo "First argument to this script is stack's number to install"
echo '1)Ramaze stack'
echo '2)Gitosis stack'
echo '3)Trac stack'
echo '4)Grails stack'
echo '5)Mysql stack'
echo '6)PostgreSQL stack'
echo '7)LAMP stack'
echo '8)Subversion stack'
echo '9)Lighttpd stack'
}
user_input () {
echo 'Please select desired stack:'
echo '1)Ramaze stack'
echo '2)Gitosis stack'
echo '3)Trac stack'
echo '4)Grails stack'
echo '5)Mysql stack'
echo '6)PostgreSQL stack'
echo '7)LAMP stack'
echo '8)Subversion stack'
echo '9)Lighttpd stack'
read stack
do_work $stack
}
do_work () {
case "$1" in
1)
cd ramaze-stack
./build-ramaze-stack.sh
;;
2)
cd gitosis-stack
./build-gitosis-stack.sh
;;
3)
cd trac-stack
./build-trac-stack.sh $2 $3
;;
4)
cd grails-stack
./build-grails-stack.sh
;;
5)
cd mysql-stack
./build-mysql-stack.sh
;;
6)
cd postgresql-stack
./build-postgresql-stack.sh
;;
7)
cd lamp-stack
./build-lamp-stack.sh
;;
8)
cd subversion-stack
./build-subversion-stack.sh $2 $3
;;
9)
cd lighttpd-stack
./build-lighttpd-stack.sh
;;
*)
echo 'Wrong selection'
exit 2
;;
esac
}
if [ $# -ne 1 -a $# -ne 3 ]; then
user_input
else
do_work $1 $2 $3
fi