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 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