#!/bin/sh # # adc.sh # a simple wrapper for adcomplain, so that it can be used from # within Emacs, or elsewhere that it isn't practical to expect to # be able to grab additional input from the user. # # Usage: pipe the offending message to this wrapper, passing any # appropriate arguments (i.e., `-c' for a chain-letter posting, etc.) # This will take care of the rest, and fire up an xterm for user # interaction # # Author : C Matthew Curtin # Created On : <1998/04/09 23:26:13 cmcurtin> # Last Modified By: $Author: cmcurtin $ # Last Modified On: $Date: 2003/07/23 15:31:57 $ # Update Count : # Status : # # Define Variables you want to use for customization here: ADCOMPLAIN_FROM='your@address.goes.here' EDITOR=vi export ADCOMPLAIN_FROM EDITOR # the file where the offending post gets dropped for examination file=/tmp/adcomplain-$LOGNAME-`hostname` # slurp it from stdin cat > ${file} # if we've got a $DISPLAY, start a new xterm(1) and run adcomplain in it # if there's no $DISPLAY, just fire up adcomplain if [ x${DISPLAY} != x"" ] then # fire up adcomplain (be sure it's in your path) xterm -e adcomplain $@ -p ${file} else adcomplain $@ -p ${file} fi # see, ma, I'm picking up after myself... rm ${file}