Forum: Ruby Problem involving Ruby, git and cron

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
53581739a445ad78250a676dabddf55f?d=identicon&s=25 James Coglan (Guest)
on 2009-04-16 18:44
(Received via mailing list)
Sorry to post this here, it's really a combined Ruby/Linux/Git problem
but
I'm hoping someone here can point me in the right direction. I've
written a
Ruby script that exports all known branches of some git repos to static
files, and optionally performs builds of JavaScript projects. It looks
like
this:

http://gist.github.com/96357

To run: save this in a file, e.g. ~/widgets/export, make it executable
and
perform the following in the ~/widgets directory:

chmod +x export
mkdir repos
mkdir static
cd repos
git clone git://github.com/jcoglan/heist.git
git clone git://github.com/jcoglan/js.class.git

Also, install these:

sudo gem install hoe grit jake

Then, go back to your home dir and run the script:

cd ~
widgets/export

You should see a ton of stuff appear in the 'static' dir. Also notice
that
the contents of static/js.class/0.9.0 and static/js.class/2.0.0 (for
example) are different. Next, set this script up to run under cron using
'crontab -e' (First digit is the minutes past the hour the script will
run.
Replace my username with your own.)

crontab -e
40 * * * * /home/jcoglan/widgets/export

Wait for the script to run, then inspect the directories again. All
versions
of js.class are now the same, whereas the heist versions are still
distinct.
Also, If I remove the heist repo, js.class exports correctly.

I've no idea why any of this should be the case: any help would be very
gratefully received!
This topic is locked and can not be replied to.