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