]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/dinstall.functions
append cron.daily's output to dinstall's logfile
[dak.git] / config / debian / dinstall.functions
index 0ad674ea1d39a5cbe2a8a8a8fbbcc888ebebb154..98972e6df0559f845dd4d1d5ffb211040b44965f 100644 (file)
@@ -22,7 +22,11 @@ function onerror() {
     fi
     subject="${subject} dinstall error at ${ERRDATE} in ${STAGEFILE} - (Be quiet, Brain, or I'll stab you with a Q-tip)"
 
-    cat "${STAGEFILE}.log" | mail -s "${subject}" -a "X-Debian: DAK" cron@ftp-master.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org
+    if [ -r "${STAGEFILE}.log" ]; then
+        cat "${STAGEFILE}.log"
+    else
+        echo "file ${STAGEFILE}.log does not exist, sorry"
+    fi | mail -s "${subject}" -a "X-Debian: DAK" cron@ftp-master.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org
 }
 
 ########################################################################