Overview
Comment: | Created to assist in development of diy rep structure [548475] |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
fdd6acf4e2615d9717e01f08175297bf |
User & Date: | geraint@users.sourceforge.net on 2002-08-20 19:23:28 |
Other Links: | branch diff | manifest | tags |
Context
2002-08-20
| ||
19:33:21 |
Minor bug fixes and enhancements (I hope):
Delimited expressions within function calls to prevent denominators from continuing beyond commas. | |
19:23:28 | Created to assist in development of diy rep structure [548475] check-in: fdd6acf4e2 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
16:14:35 | Include Q in documentation check-in: 6a0d518521 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/lib/rep/mtt_rep_diy version [8134d7ef8f].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | #! /bin/sh rep_name="diy" help_message=" A representation you can create all by yourself! The purpose of this representation is to help in the creation of a new DIY rep structure. Eventually it should form a template for creating new representations. " non_standard_options=" --crash: make the computer crash, wiping the hard drive in the process --recover: attempt to recover data after crash (by crying very loudly for 10 minutes) " texi_message=" This message should be really, really helpful. @node Stuff, More Stuff, Top, Top Stuff! @node More Stuff, Top, Top, Top More Stuff " # function definitions for non-standard options (should have same name) crash () { touch .crash echo "IDIOT!" exit 99 } recover () { if [ -f .crash ]; then cat <<EOF A long time ago in galaxy far away data can't be found EOF else echo "Recovery worked - your data is safe!" fi } hello () { echo "Hello ${USER}!" } languages="ada c c++ fortran m pascal ps" # this is used for documentation only process_language () { Language=$1 case ${Language} in 'c') echo "C is a good language" ;; 'c') echo "C++ is a great language" ;; *) exit ${ELanguageUnknown} ;; esac } ##################################################################### ### It should not be necessary to edit anything below this line ### ##################################################################### # Error codes ELanguageUnknown="-2" # MTT will continue from here ENoLanguageSpecified="-10" help () { cat <<EOF $0: help MTT representation ${rep_name} ${help_message} EOF } usage () { cat <<EOF $0: usage mtt [mtt_options] ${rep_name} [options] lang standard options: --help: print useful help message --usage: print this useful message --texi: print very useful message additional options: ${non_standard_options} EOF } texi () { cat <<EOF @settitle MTT: ${rep_name} representation ${texi_message} EOF } error () { cat <<EOF *** Error: MTT (${rep_name}): $1 : exiting ($2) EOF exit $2 } warn () { cat <<EOF *** Warning: MTT (${rep_name}): $1 : continuing EOF } process_arguments () { if [ $# -eq 0 ]; then help usage else while [ -n "`echo $1 | grep '^--'`" ]; do option=`echo $1 | sed 's/\-\-\(.*\)/\1/'` ${option} 2> /dev/null || warn "option --${option} unknown" shift done export Language="$*" fi } process_arguments $* if [ ! "${Language}" ]; then error "no language specified" ${NoLanguageSpecified} fi process_language ${Language} |