Thanks Samuel, I would suggest to include your script as another directive for Makefile (if possible) In older machines this unneeded compilations takes a lot of time Daniel PS It works. I put the script below in a file OrgUpdate daniel@martins:~/Trabalho/svn/lib/emacs-lisp/org-mode$ OrgUpdate Already up-to-date. # On branch master # Changed but not updated: # (use "git add ..." to update what will be committed) # # modified: Makefile # no changes added to commit (use "git add" and/or "git commit -a") daniel@martins:~/Trabalho/svn/lib/emacs-lisp/org-mode$ 2009/9/10 Samuel Wales > Perhaps the makefile could use texi2html and emacs-w3m could display? > > Also, AFAIK, git pull does not return an exit status, so && will always > execute. > > One solution: > > head=`git rev-parse --verify HEAD` > git pull > git status > newhead=`git rev-parse --verify HEAD` > if [ "$newhead" != "$head" ] > then > #does make clean ret exit code? > account echodoq1 make cleanall > elup--make-clean && > echo \=== make && > make>elup--make 2>&1 && > echo && > cat elup--make | account mygrep error > diffoldnew cat doc/org.texi > #make install ... unnec unless you want > #delorg to be backed up. if so then > #install setting prefix lispdir etc. in > #some annoying way > fi >