Last change
on this file since 1298 was
1298,
checked in by mitchb, 15 years ago
|
Deploy Ruby on Rails autoinstaller
(Merge of r1294:1297 from branches/locker-dev to trunk)
|
-
Property svn:executable set to
*
|
File size:
816 bytes
|
Rev | Line | |
---|
[127] | 1 | #!/bin/sh |
---|
| 2 | |
---|
[997] | 3 | choices () { |
---|
| 4 | echo 'mediawiki MediaWiki' |
---|
| 5 | echo 'wordpress WordPress' |
---|
| 6 | echo 'joomla Joomla' |
---|
| 7 | echo 'e107 e107' |
---|
| 8 | echo 'gallery2 Gallery2' |
---|
| 9 | echo 'phpbb phpBB' |
---|
| 10 | echo 'advancedbook Advanced Guest Book' |
---|
| 11 | echo 'phpical PHP iCalendar' |
---|
| 12 | echo 'trac Trac' |
---|
| 13 | echo 'turbogears TurboGears' |
---|
[1012] | 14 | echo 'django Django' |
---|
[1298] | 15 | echo 'rails Ruby on Rails' |
---|
[997] | 16 | } |
---|
| 17 | |
---|
| 18 | nchoices=`choices | wc -l` |
---|
| 19 | |
---|
[127] | 20 | echo |
---|
| 21 | echo "What piece of software would you like to install?" |
---|
| 22 | echo |
---|
[997] | 23 | choices | sed 's/^[^ ]* //' | cat -n |
---|
[127] | 24 | echo |
---|
[997] | 25 | printf "Please enter a number 1-%d: " "$nchoices" |
---|
[127] | 26 | read num |
---|
| 27 | echo |
---|
| 28 | |
---|
| 29 | attach scripts 2>/dev/null |
---|
[997] | 30 | choice=`choices | sed -n "$num { s/ .*$//; p; }"` |
---|
| 31 | if [ -n "$choice" ]; then |
---|
| 32 | . "/mit/scripts/bin$scriptsdev/scripts-$choice" |
---|
[127] | 33 | else |
---|
[458] | 34 | echo "ERROR:" |
---|
[997] | 35 | echo "You must enter a number 1 through $nchoices." |
---|
[127] | 36 | exit 1 |
---|
| 37 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.