source:
trunk/locker/bin/scripts-start
@
1613
Last change on this file since 1613 was 1585, checked in by ezyang, 14 years ago | |
---|---|
|
|
File size: 693 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' | |
8 | echo 'trac Trac' | |
9 | echo 'turbogears TurboGears' | |
[1012] | 10 | echo 'django Django' |
[1298] | 11 | echo 'rails Ruby on Rails' |
[997] | 12 | } |
13 | ||
14 | nchoices=`choices | wc -l` | |
15 | ||
[127] | 16 | echo |
17 | echo "What piece of software would you like to install?" | |
18 | echo | |
[997] | 19 | choices | sed 's/^[^ ]* //' | cat -n |
[127] | 20 | echo |
[997] | 21 | printf "Please enter a number 1-%d: " "$nchoices" |
[127] | 22 | read num |
23 | echo | |
24 | ||
25 | attach scripts 2>/dev/null | |
[997] | 26 | choice=`choices | sed -n "$num { s/ .*$//; p; }"` |
27 | if [ -n "$choice" ]; then | |
28 | . "/mit/scripts/bin$scriptsdev/scripts-$choice" | |
[127] | 29 | else |
[458] | 30 | echo "ERROR:" |
[997] | 31 | echo "You must enter a number 1 through $nchoices." |
[127] | 32 | exit 1 |
33 | fi |
Note: See TracBrowser
for help on using the repository browser.