zedapp/zed — pull request #312 by robru (2014-04-25 09:20:28+00:00)
Title: Automatically re-fetch app/ace when it is more than one month old.

Here's a little trick I think you might enjoy ;-)

What I've done is created a temporary file and fudged its creation date to be one month ago. Then this file is listed as a prerequisite for `app/ace`. The result is, if `app/ace` is older than that file (eg, older than a month), it'll get updated.

Because the file is stored in `/tmp`, it will most likely be deleted when you reboot your computer. In the event that it is missing, it is recreated harmlessly.

Here are some steps you can take to test this:

```
$ rm -rf /tmp/one_month_ago
$ rm -rf app/ace
$ make app/ace
touch /tmp/one_month_ago -t 201403260000
curl -L https://github.com/zefhemel/ace-builds/archive/master.tar.gz | tar xzf -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 127 100 127 0 0 308 0 --:--:-- --:--:-- --:--:-- 309
100 1042k 100 1042k 0 0 412k 0 0:00:02 0:00:02 --:--:-- 572k
rm -rf app/ace
mv ace-builds-master/ace app/ace
rm -rf ace-builds-master
$ make app/ace
make: `app/ace' is up to date.
$ touch app/ace -t 201403230000 # Just a couple days more than a month ago
$ make app/ace
curl -L https://github.com/zefhemel/ace-builds/archive/master.tar.gz | tar xzf -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 127 100 127 0 0 282 0 --:--:-- --:--:-- --:--:-- 282
100 1042k 100 1042k 0 0 336k 0 0:00:03 0:00:03 --:--:-- 414k
rm -rf app/ace
mv ace-builds-master/ace app/ace
rm -rf ace-builds-master
```

Naturally, GNU `date` and OSX `date` are incompatible, so I resorted to a bit of python to do some cross-platform date logic. I'm open to suggestions on improving that.

Let me know what you think, thanks.