Last change
on this file since 1545 was
1087,
checked in by geofft, 15 years ago
|
multiplexer over scripts-start/signup-* for "add scripts; scripts"
Plus copy the attach -q thing from signup-web to -mail and -cron
|
-
Property svn:executable set to
*
|
File size:
773 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | choices () { |
---|
4 | echo 'scripts-start Begin a Quick-Start autoinstall (wikis, blogs, etc.)' |
---|
5 | echo 'signup-web Enable the web scripts service' |
---|
6 | echo 'signup-cron Enable the cron scripts service' |
---|
7 | echo 'signup-mail Enable the mail scripts service' |
---|
8 | echo 'signup-sql Sign up for a sql.mit.edu account' |
---|
9 | } |
---|
10 | |
---|
11 | nchoices=`choices | wc -l` |
---|
12 | |
---|
13 | echo |
---|
14 | echo "Welcome to scripts.mit.edu. Which service would you like to use?" |
---|
15 | echo |
---|
16 | choices | sed 's/^[^ ]* //' | cat -n |
---|
17 | echo |
---|
18 | printf "Please enter a number 1-%d: " "$nchoices" |
---|
19 | read num |
---|
20 | echo |
---|
21 | |
---|
22 | attach scripts 2>/dev/null |
---|
23 | choice=`choices | sed -n "$num { s/ .*$//; p; }"` |
---|
24 | if [ -n "$choice" ]; then |
---|
25 | . "/mit/scripts/bin$scriptsdev/$choice" |
---|
26 | else |
---|
27 | echo "ERROR:" |
---|
28 | echo "You must enter a number 1 through $nchoices." |
---|
29 | exit 1 |
---|
30 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.