9 date 96.02.09.01.29.45; author jromine; state Exp;
14 date 95.12.06.21.00.46; author jromine; state Exp;
19 date 95.12.06.20.57.55; author jromine; state Exp;
24 date 93.08.20.15.48.51; author jromine; state Exp;
29 date 92.11.16.22.32.36; author jromine; state Exp;
34 date 92.11.02.21.58.59; author jromine; state Exp;
39 date 92.10.26.16.58.14; author jromine; state Exp;
44 date 92.10.26.16.43.45; author jromine; state Exp;
49 date 92.10.26.16.42.30; author jromine; state Exp;
63 @: run this script through /bin/sh
67 echo "usage: bootmhn.sh MH-library-area" 1>&2
71 MHN="$LIB/mhn_defaults"
74 echo "%s: already exists." 1>&2
78 trap "rm -f $TMP" 0 1 2 3 13 15
80 echo "mhn-store-text: %m%P.txt" >> $TMP
81 echo "mhn-store-text/richtext: %m%P.rt" >> $TMP
82 echo "mhn-store-video/mpeg: %m%P.mpg" >> $TMP
83 echo "mhn-store-application/PostScript: %m%P.ps" >> $TMP
84 echo "mhn-show-application/pgp: %ppgpshow -show '%F' %a" >> $TMP
85 echo "mhn-store-application/pgp: | pgpshow -store %m%P.pgp %a" >> $TMP
86 echo "mhn-show-text/pgp: %ppgpshow -show '%F' %a" >> $TMP
87 echo "mhn-store-text/pgp: | pgpshow -store %m%P.txt %a" >> $TMP
89 PGM="`./bootmhn.findit xwud $LIB`"
90 if [ ! -z "$PGM" ]; then
91 XWUD="$PGM" X11DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
96 PGM="`./bootmhn.findit pbmtoxwd $LIB`"
97 if [ ! -z "$PGM" ]; then
98 PBM="$PGM" PBMDIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
103 PGM="`./bootmhn.findit xv $LIB`"
104 if [ ! -z "$PGM" ]; then
106 mhn-show-image: %p$PGM -geometry =-0+0 '%f'" >> $TMP
107 elif [ ! -z $"PBM" -a ! -z "$XWUD" ]; then
109 mhn-show-image/gif: %p${PBMDIR}giftoppm | ${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
110 mhn-show-image/x-pbm: %p${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
111 mhn-show-image/x-pgm: %p${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
112 mhn-show-image/x-ppm: %p${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
113 mhn-show-image/x-xwd: %p$XWUD -geometry =-0+0" >> $TMP
115 PGM="`./bootmhn.findit djpeg $LIB`"
116 if [ ! -z "$PGM" ]; then
118 mhn-show-image/jpeg: %p$PGM -Pg | ${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0" >> $TMP
122 if [ -f "/dev/audioIU" ]; then
123 PGM="`./bootmhn.findit recorder $LIB`"
124 if [ ! -z "$PGM" ]; then
126 mhn-store-audio/basic: %m%P.au
127 mhn-compose-audio/basic: ${AUDIODIR}recorder '%f' -au -pause > /dev/tty
128 mhn-show-audio/basic: %p${AUDIODIR}splayer -au" >> $TMP
130 elif [ -f "/dev/audio" ]; then
131 PGM="`./bootmhn.findit raw2audio $LIB`"
132 if [ ! -z "$PGM" ]; then
133 AUDIODIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
135 mhn-store-audio/basic: | ${AUDIODIR}raw2audio -e ulaw -s 8000 -c 1 > %m%P.au
136 mhn-store-audio/x-next: %m%P.au" >> $TMP
137 AUDIOTOOL="`./bootmhn.findit audiotool $LIB`"
138 if [ ! -z "$AUDIOTOOL" ]; then
140 mhn-compose-audio/basic: $AUDIOTOOL %f && ${AUDIODIR}raw2audio -F < %f" >> $TMP
143 mhn-compose-audio/basic: trap \"exit 0\" 2 && ${AUDIODIR}record | ${AUDIODIR}raw2audio -F" >> $TMP
146 mhn-show-audio/basic: %p${AUDIODIR}raw2audio 2>/dev/null | ${AUDIODIR}play" >> $TMP
148 PGM="`./bootmhn.findit adpcm_enc $LIB`"
149 if [ ! -z "$PGM" ]; then
150 DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
151 if [ ! -z "$AUDIOTOOL" ]; then
153 mhn-compose-audio/x-next: $AUDIOTOOL %f && ${DIR}adpcm_enc < %f" >> $TMP
156 mhn-compose-audio/x-next: ${AUDIODIR}record | ${DIR}adpcm_enc" >> $TMP
159 mhn-show-audio/x-next: %p${DIR}adpcm_dec | ${AUDIODIR}play" >> $TMP
161 if [ ! -z "$AUDIOTOOL" ]; then
163 mhn-compose-audio/x-next: $AUDIOTOOL %f" >> $TMP
166 mhn-compose-audio/x-next: ${AUDIODIR}record" >> $TMP
169 mhn-show-audio/x-next: %p${AUDIODIR}play" >> $TMP
173 mhn-compose-audio/basic: cat < /dev/audio
174 mhn-show-audio/basic: %pcat > /dev/audio" >> $TMP
178 PGM="`./bootmhn.findit mpeg_play $LIB`"
179 if [ ! -z "$PGM" ]; then
181 mhn-show-video/mpeg: %p$PGM '%f'" >> $TMP
184 PGM="`./bootmhn.findit lpr $LIB`"
185 if [ ! -z "$PGM" ]; then
187 mhn-show-application/PostScript: %plpr -Pps" >> $TMP
189 PGM="`./bootmhn.findit lp $LIB`"
190 if [ ! -z "$PGM" ]; then
192 mhn-show-application/PostScript: %plp -dps" >> $TMP
196 PGM="`./bootmhn.findit ivs_replay $LIB`"
197 if [ ! -z "$PGM" ]; then
199 mhn-show-application/x-ivs: %p$PGM -o '%F'" >> $TMP
202 PGM="`./bootmhn.findit richtext $LIB`"
203 if [ ! -z "$PGM" ]; then
205 mhn-show-text/richtext: %p$PGM -p '%F'" >> $TMP
207 PGM="`./bootmhn.findit rt2raw $LIB`"
208 if [ ! -z "$PGM" ]; then
210 mhn-show-text/richtext: %p$PGM < '%f' | fmt -78 | more" >> $TMP
214 PGM="`./bootmhn.findit xterm $LIB`"
215 if [ ! -z "$PGM" ]; then
217 mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s" >> $TMP
225 : not until we get a "safe" postscript environment...
227 PGM="`./bootmhn.findit pageview $LIB`"
228 if [ "$DISPLAY" = "unix:0.0" -a ! -z "$PGM" ]; then
229 echo "mhn-show-application/PostScript: %p$PGM -" >> $TMP
231 PGM="`./bootmhn.findit gs $LIB`"
232 if [ ! -z "$PGM" ]; then
233 echo "mhn-show-application/PostScript: %p$PGM -- '%F'" >> $TMP
237 : have to experiment more with this
239 PGM="`./bootmhn.findit ivs_record $LIB`"
240 if [ ! -z "$PGM" ]; then
242 mhn-compose-application/x-ivs: $PGM -u localhost '%F'" >> $TMP
249 @more pgp fixes from mtr
260 @pgp changes from mtr
287 mhn-compose-audio/basic: ${AUDIODIR}record | ${AUDIODIR}raw2audio -F
288 mhn-show-audio/basic: %p${AUDIODIR}raw2audio 2>/dev/null | play" >> $TMP
291 mhn-compose-audio/x-next: ${AUDIODIR}record | ${DIR}adpcm_enc
294 mhn-compose-audio/x-next: ${AUDIODIR}record
301 @use [ -f ...] instead of -x/-c since those options aren't present everywhere
307 mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-*-*-iso8859-*' -e %s" >> $TMP
314 @add single quotes around %f
319 if [ -c "/dev/audioIU" ]; then
322 elif [ -c "/dev/audio" ]; then
328 @new version from MTR
333 mhn-show-image: %p$PGM -geometry =-0+0 %f" >> $TMP
336 mhn-compose-audio/basic: ${AUDIODIR}recorder %f -au -pause > /dev/tty
339 mhn-show-text/richtext: %p$PGM -p %F" >> $TMP
342 mhn-show-text/richtext: %p$PGM < %f | fmt -78 | more" >> $TMP
345 echo "mhn-show-application/PostScript: %p$PGM -- %F" >> $TMP
359 if [ -c "/dev/audio" ]; then
362 elif [ -c "/dev/audioIU" ]; then
363 PGM="`./bootmhn.findit recorder $LIB`"
364 if [ ! -z "$PGM" ]; then
366 mhn-store-audio/basic: %m%P.au
367 mhn-compose-audio/basic: ${AUDIODIR}recorder %f -au -pause > /dev/tty
368 mhn-show-audio/basic: %p${AUDIODIR}splayer -au" >> $TMP