Changeset 1087


Ignore:
Timestamp:
Apr 20, 2009, 6:03:58 PM (15 years ago)
Author:
geofft
Message:
multiplexer over scripts-start/signup-* for "add scripts; scripts"

Plus copy the attach -q thing from signup-web to -mail and -cron

Location:
locker/bin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • locker/bin/scripts

    r127 r1087  
    11#!/bin/sh
    22
     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
    322attach scripts 2>/dev/null
    4 . /mit/scripts/bin/scripts-start
     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
  • locker/bin/signup-cron

    r660 r1087  
    11#!/bin/sh
    22
    3 attach scripts
     3attach -q scripts
    44. /mit/scripts/bin$scriptsdev/signup-minimal
    55
  • locker/bin/signup-mail

    r1011 r1087  
    11#!/bin/sh
    22
    3 attach scripts
     3attach -q scripts
    44. /mit/scripts/bin$scriptsdev/signup-minimal
    55
Note: See TracChangeset for help on using the changeset viewer.