You want to track my Lunar modules? Just follow the directions below.
- Get bootstrapped with darcs (a really cool SCM tool), here is a single darcs binary for x86-linux and a little wrapper script, just unzip and put both in your PATH:
- As root, go to your /var/lib/lunar/moonbase/zlocal (no worries, nothing will be overwritten) and type "darcs init". Tada! zlocal is now a darcs repository and you can see a new directory called "_darcs". But having a directory called "_darcs" in zlocal screws up the lunar tools. So we move it to /root/ldarcs/_darcs:
mv _darcs /root/ldarcs/
And then we use the "ldarcs" wrapper script instead of "darcs" - it will symlink that directory during execution, and remove it afterwards. (You can also patch the lunar tools to ignore "_darcs", and I have such patches but this is simpler and less intrusive)
- Okidoki, getting down to business. One of the great things with darcs is that it is so simple to use and that there is no need for a central repository. So you can trivially "pull" other people's modules into your own zlocal! So now, to get my published modules, place yourself in your /var/lib/lunar/moonbase/zlocal and do this:
ldarcs pull -a http://darcs.krampe.se/zlocal
This should pull all (-a) my modules without asking. If you leave "-a" out then it should go into interactive mode and you can press ? to get advice. Just pick the modules/patches you like - or all.
And whenever in the future you want to get any new updates from me, just rerun pull as above. Then darcs will figure out what new changes I have in my repo and you can cherrypick those you want to have (new modules or upgrades of old ones).
- You want to track multiple other zlocals? Well, just write a bash script somewhere that simply has a bunch of lines like the above. The nice thing is that darcs can pull from various places into your zlocal and keep track of it all.
- You want to publish your own zlocal modules? Just learn a bit more of darcs, put your own modules under darcs control and push them out on a webserver, darcs is very easy to use. Email me for more detailed instructions. :)
- Say you fixed some of my modules and want to feed the changes back to me. Do something like this:
(then select the changes - typically all - you want to group as a darcs patch, and give it a name)
- cd /var/lib/lunar/moonbase/zlocal
- ldarcs record
- ldarcs send (select the patches to send to me by email)
And right, after getting the modules you can also find the two modules ghc and darcs and lin those if you want a properly compiled darcs, but beware, compiling ghc takes about 2 hours!