source: branches/locker-dev/locker/bin/scripts @ 1526

Last change on this file since 1526 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
3choices () {
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
11nchoices=`choices | wc -l`
12
13echo
14echo "Welcome to scripts.mit.edu. Which service would you like to use?"
15echo
16choices | sed 's/^[^ ]* //' | cat -n
17echo
18printf "Please enter a number 1-%d: " "$nchoices"
19read num
20echo
21
22attach scripts 2>/dev/null
23choice=`choices | sed -n "$num { s/ .*$//; p; }"`
24if [ -n "$choice" ]; then
25  . "/mit/scripts/bin$scriptsdev/$choice"
26else
27  echo "ERROR:"
28  echo "You must enter a number 1 through $nchoices."
29  exit 1
30fi
Note: See TracBrowser for help on using the repository browser.