cosmetic
darcs-hash:20020227013142-a279a-df5a919c65f53f694cd7c10cf93866fd26747067.gz
This commit is contained in:
parent
31e5d2de63
commit
5251afde6b
1 changed files with 19 additions and 24 deletions
43
news-cancel
43
news-cancel
|
@ -6,7 +6,7 @@
|
|||
## Login stransky <stransky@crans.org>
|
||||
##
|
||||
## Started on dim 13 jan 2002 02:30:56 CET Nicolas STRANSKY
|
||||
## Last update ven 25 jan 2002 08:53:48 CET Nicolas STRANSKY
|
||||
## Last update mer 27 fév 2002 02:28:58 CET Nicolas STRANSKY
|
||||
##
|
||||
## Script pour annuler ou modérer un message de news.
|
||||
#
|
||||
|
@ -28,7 +28,7 @@ VERIF () {
|
|||
;;
|
||||
|
||||
*)
|
||||
echo "on ne fait rien"
|
||||
echo "On ne fait rien."
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
@ -36,26 +36,20 @@ VERIF () {
|
|||
}
|
||||
|
||||
SAUVEGARDE () {
|
||||
echo "sauvegarde du mail dans /root/moderes/ ? [o/n] "
|
||||
read reponse
|
||||
case $reponse in
|
||||
o*|O*)
|
||||
rep=`echo $newsgroup | sed 's/\./\//g'`
|
||||
cp /var/spool/news/articles/$rep/$numero /root/moderes/$newsgroup'.'$numero.nws
|
||||
moderateur=`who am i | awk '{print $1}'`
|
||||
echo "modérateur : $moderateur" > /tmp/commentaires.txt
|
||||
echo "commentaires : " >> /tmp/commentaires.txt
|
||||
$EDITOR /tmp/commentaires.txt
|
||||
echo . >> /tmp/commentaires.txt
|
||||
cat /tmp/commentaires.txt | mutt -nx -a /root/moderes/$newsgroup'.'$numero.nws -s "moderation de $newsgroup.$numero par $moderateur" moderateurs
|
||||
rm -f /tmp/commentaires.txt
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "on ne fait rien"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
echo "Sauvegarde du message dans /root/moderes/..."
|
||||
sleep 1
|
||||
rep=`echo $newsgroup | sed 's/\./\//g'`
|
||||
cp /var/spool/news/articles/$rep/$numero /root/moderes/$newsgroup'.'$numero.nws
|
||||
moderateur=`who am i | awk '{print $1}'`
|
||||
echo "$1 de $newsgroup.$numero" > /tmp/news-cancel1.txt
|
||||
echo " " >> /tmp/news-cancel1.txt
|
||||
echo "modérateur : $moderateur" >> /tmp/news-cancel1.txt
|
||||
echo "commentaires : " > /tmp/news-cancel-commentaires.txt
|
||||
$EDITOR /tmp/news-cancel-commentaires.txt
|
||||
cat /tmp/news-cancel-commentaires.txt >> /tmp/news-cancel1.txt
|
||||
cat /tmp/news-cancel1.txt | mutt -nx -a /root/moderes/$newsgroup'.'$numero.nws -s "moderation de $newsgroup.$numero par $moderateur" moderateurs
|
||||
rm -f /tmp/news-cancel*
|
||||
echo " "
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,14 +75,15 @@ then
|
|||
case $1 in
|
||||
\<*@*\>)
|
||||
VERIF $1
|
||||
SAUVEGARDE
|
||||
echo "edition ou annulation du message ? [E/A] "
|
||||
echo "Edition ou Annulation du message ? [E/A] "
|
||||
read action
|
||||
case $action in
|
||||
e*|E*)
|
||||
SAUVEGARDE Edition
|
||||
EDITION
|
||||
;;
|
||||
a*|A*)
|
||||
SAUVEGARDE Annulation
|
||||
CANCEL \'$1\'
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue