Created
November 7, 2012 18:36
-
-
Save Miuler/4033469 to your computer and use it in GitHub Desktop.
Script para notificar de nuevos cambios en un repositorio hg
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/bash | |
| verificar_hg() { | |
| cd /home/miuler/aep-dsm/$1 | |
| #mensaje=`hg -q in --template '{author|user} :: {desc|firstline|strip}\n------------------------------------------------------------\n'` | |
| #mensaje=`hg in | tail -n +2` | |
| mensaje=`hg in | tail -n +2|sed -r s/revision/---------------------------------------------\\\nrevision/` | |
| if [ -n "$mensaje" ] | |
| then | |
| notify-send "Cambios en $1:" "$mensaje" | |
| fi | |
| } | |
| while true; do | |
| verificar_hg "dsm-common-domain" | |
| verificar_hg "dsm-webapp" | |
| verificar_hg "dsm-esb" | |
| date >> /home/miuler/log | |
| sleep 300 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment