Re: [O] Bash script to update - only make when update there?

2013-12-13 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/13/13, 01:26 , Suvayu Ali wrote: On Thu, Dec 12, 2013 at 10:00:22AM +0100, Rainer M Krug wrote: On 12/10/13, 21:50 , Samuel Wales wrote: gitpullv () { #echo \=== maybe need to grab tags head=`git rev-parse --verify HEAD` echo git pull

Re: [O] Bash script to update - only make when update there?

2013-12-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/10/13, 21:50 , Samuel Wales wrote: gitpullv () { #echo \=== maybe need to grab tags head=`git rev-parse --verify HEAD` echo git pull --stat --log | cat echo newhead=`git rev-parse --verify HEAD` if [ $newhead != $head ] then git log

Re: [O] Bash script to update - only make when update there?

2013-12-12 Thread Suvayu Ali
On Thu, Dec 12, 2013 at 10:00:22AM +0100, Rainer M Krug wrote: On 12/10/13, 21:50 , Samuel Wales wrote: gitpullv () { #echo \=== maybe need to grab tags head=`git rev-parse --verify HEAD` echo git pull --stat --log | cat echo newhead=`git rev-parse --verify HEAD` if [ $newhead != $head ]

Re: [O] Bash script to update - only make when update there?

2013-12-10 Thread Nick Dokos
Rainer M Krug rai...@krugs.de writes: Hi I have a question concerning a bash script to update org (and ess in the same way but in a different script). The script I use to update org looks as follow: #!/bin/sh cd ~/.emacs.d/org-git #!/bin/sh git checkout master make update

Re: [O] Bash script to update - only make when update there?

2013-12-10 Thread Achim Gratz
Rainer M Krug writes: git checkout master make update This doesn't update at all since you never do a git pull on master. which works nicely, but I would like to only execute the make update if git updated something - I am sure this is possible, but how? I really don't see why you'd need to

Re: [O] Bash script to update - only make when update there?

2013-12-10 Thread Achim Gratz
Achim Gratz writes: Rainer M Krug writes: git checkout master make update This doesn't update at all since you never do a git pull on master. Scratch that, I was imagining an update2 where you clearly wrote update. In any case (and to answer Nick Dokos' remark) make always does a full

Re: [O] Bash script to update - only make when update there?

2013-12-10 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/10/13, 16:59 , Nick Dokos wrote: Rainer M Krug rai...@krugs.de writes: Hi I have a question concerning a bash script to update org (and ess in the same way but in a different script). The script I use to update org looks as follow:

Re: [O] Bash script to update - only make when update there?

2013-12-10 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/10/13, 18:12 , Achim Gratz wrote: Achim Gratz writes: Rainer M Krug writes: git checkout master make update This doesn't update at all since you never do a git pull on master. Scratch that, I was imagining an update2 where you

Re: [O] Bash script to update - only make when update there?

2013-12-10 Thread Nick Dokos
Rainer M Krug rai...@krugs.de writes: On 12/10/13, 16:59 , Nick Dokos wrote: ... Be that as it may, you can try something like this hack (those are backticks around the git pull - it's under the ESC key in the upper left hand corner on most US keyboards but it may be somewhere else on

Re: [O] Bash script to update - only make when update there?

2013-12-10 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/10/13, 20:31 , Nick Dokos wrote: Rainer M Krug rai...@krugs.de writes: On 12/10/13, 16:59 , Nick Dokos wrote: ... Be that as it may, you can try something like this hack (those are backticks around the git pull - it's under the ESC key

Re: [O] Bash script to update - only make when update there?

2013-12-10 Thread Samuel Wales
gitpullv () { #echo \=== maybe need to grab tags head=`git rev-parse --verify HEAD` echo git pull --stat --log | cat echo newhead=`git rev-parse --verify HEAD` if [ $newhead != $head ] then git log --pretty=tformat:%s ORIG_HEAD.. | cat # git log