Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. $ crontab -l
  2. # -*- conf -*-
  3. PATH=/home/luser/.bin:/bin:/usr/bin:/usr/local/bin
  4.  
  5. #minute hour mday month wday command
  6. */30 * * * * slurp git /a/mplayer-build
  7. */30 * * * * slurp hg /a/playd.sh
  8.  
  9. $ cat ~/.bin/slurp
  10. #! /bin/sh
  11.  
  12. vcs=$1
  13. dir=$2
  14. shift 2
  15.  
  16. cd "$dir"
  17. case $vcs in
  18. hg)
  19. if hg incoming -q --bundle .hgbundle; then
  20. hg pull -q .hgbundle
  21. rm .hgbundle
  22. fi
  23. ;;
  24. git)
  25. if git fetch 2>&- >&-; then
  26. git log --oneline ..origin
  27. fi
  28. ;;
  29. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement