Created
March 18, 2011 21:51
-
-
Save wchristian/876911 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# change to home dir | |
cd $HOME | |
# erzeuge log file name basierend auf Datum, Zeit und Prozess ID | |
log=log/t5-download-lf10-`date '+%y%m%dT%H%M'`.$$.log | |
exec 0<&- | |
exec 1> $log | |
exec 2>&1 | |
echo "(begin `date`)" | |
lock=$HOME/t5-download-lf10.lock | |
if lockfile -r 1 $lock; then | |
# -e= stop after non-zero return, -x=show cmd before execute | |
# set -ex | |
set -x | |
if make -f makefile5 download-lf10 | |
then echo "t5-download-lf10 success" | |
else | |
errorTime=`date '+%F %T'` | |
mutt -s "t5-download-lf10 failure time: ${errorTime}" [email protected] | |
mutt -s "t5-dwonload-lf10 failure time: ${errorTime}" [email protected] | |
fi | |
rm -f $lock | |
fi | |
echo "(end `date`)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment