crontab 539 B

1
  1. */5 * * * * WD=~/public_html/wiki ; D2G=$WD/wikidata-ffdo ; LOCK=$WD/darcs2git.lock ; cd $D2G && { date "+\%F \%T" ; export LANG=de_DE.UTF-8 ; if [ -e $LOCK ] ; then lockf -t 0 $LOCK sh -c "touch $LOCK.touch && touch -A -0955 $LOCK.touch && [ $LOCK.touch -nt $LOCK ] && rm $LOCK" && echo "lock removed" ; else lockf -t 0 $LOCK sh -c "_NOWIKI/git2darcs/git2darcs.sh && export PATH=$PATH:/usr/local/bin ; /usr/local/bin/darcs push --all && sleep 55 && _NOWIKI/darcs2git/darcs2git.sh && /usr/local/bin/git push" ; fi ; } >> $WD/darcs2git.log