emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Nick Dokos
Subject: Re: [O] Bash script to update - only make when update there?
Date: Tue, 10 Dec 2013 14:31:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Rainer M Krug <address@hidden> 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 yours):
>>
>> if [ "`git pull`" == "Already up-to-date" ] then echo "Up to date"
>> else make update fi
>
> True - but if git pull does change the message, I have to change it as
> well - I just leave it as it is.
>

Here for your amusement is a way to get around this problem:

if [ "`git pull`" == "`git pull`" ]
then
        echo Up to date
else
        make update
fi

You pay double the cost every time you use it but if they ever *do*
change the message, it's not going to break. But of course, if the shell
ever optimizes the second git pull away, you are back at square one...

With-tongue-firmly-in-cheek-ly yours,
Nick







reply via email to

[Prev in Thread] Current Thread [Next in Thread]