[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
- [O] Bash script to update - only make when update there?, Rainer M Krug, 2013/12/10
- Re: [O] Bash script to update - only make when update there?, Nick Dokos, 2013/12/10
- Re: [O] Bash script to update - only make when update there?, Rainer M Krug, 2013/12/10
- Re: [O] Bash script to update - only make when update there?,
Nick Dokos <=
- Re: [O] Bash script to update - only make when update there?, Rainer M Krug, 2013/12/10
- Re: [O] Bash script to update - only make when update there?, Samuel Wales, 2013/12/10
- Re: [O] Bash script to update - only make when update there?, Rainer M Krug, 2013/12/12
- Re: [O] Bash script to update - only make when update there?, Suvayu Ali, 2013/12/12
- Re: [O] Bash script to update - only make when update there?, Rainer M Krug, 2013/12/13
- Re: [O] Bash script to update - only make when update there?, Achim Gratz, 2013/12/10