source: trunk/locker/bin/scripts-start @ 1730

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