scripts/mailWarn_dirtyEtc.sh
krempp 53e27f3168 initial import
darcs-hash:20000522114755-92525-69a72999157b346a9dee061f02d4c3e416f951b2.gz
2000-05-22 13:47:55 +02:00

24 lines
525 B
Bash
Executable file

#!/bin/sh
#
# Envoie la liste des fichiers modifiés localement.
#
tempF=$(tempfile -d /tmp -p "cvs_list")
tempF2=$(tempfile -d /tmp -p "cvs_list")
tempF3=$(tempfile -d /tmp -p "cvs_list")
( echo "Subject: Status de etc"
echo "To: $1"
echo ""
echo "Liste des fichiers non synchros"
echo "-------------------------------"
) > $tempF 2>&1
cd /etc
/usr/bin/cvs -q -d /usr/cvs-rep status | grep -A8 Locally > $tempF2
if test -n "$1";
then test -s $tempF2 && cat $tempF $tempF2 | sendmail "$1";
else cat $tempF $tempF2;
fi