Tuesday, 11 November 2008

I'm working on a script to be able to setup a complete new drupal installation.

Apart from setting up the default project structure in our subversion tree
/trunk/db/
/trunk/docs/
/trunk/files/
/trunk/www/

and using a local subdomain like http://localhost.krimson for each project

i was also looking for a simple way to download and install the latest drupal version from the commandline.

We all know that you can query http://updates.drupal.org/release-history/drupal/6.x to get a complete release version history of the drupal project. The task now was to be able to grab the latest version from that XML.

Hurray, hurray.. thanks to bashcurescancer.com/the-best-in-command-line-xml-xmlstarlet i learned that xmlstarlet would do the trick for me.

I installed the latest xmlstarlet lib using

  1. sudo apt-get install xmlstarlet

and than i ran

  1. curl -s 'http://updates.drupal.org/release-history/drupal/6.x' | xmlstarlet sel -t -m '//releases/release[1]/version' -v '.' 6.x

which returned the simple answer

  1. 6.6

I love those open source tools!

Written byRoel De Meester

This Open Source Evangelist is extremely serious. How serious you ask? He obtained a Masters in Quantum Physics (aka stuff only he understands), bailed out of his PhD studies to obtain a Masters in IT instead and finally ended up saying 'yes' when Dries 'Drupal' Buytaert asked him to maintain DRUPAL.be. Known for his communication skills and no-nonsense style (make it work - and keep it running) he comes up with solutions for problems the client has never even thought of. He also provides all Krew members with shoulder taps and weekly massages. After all, Drupal is about sharing, isn't it?

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <h4> <br>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.
QR-code Krimson Antwerpen

Antwerp

Zénobe Grammestraat 34
2018 Antwerp, Belgium
Call us: +32 (0)3 298 69 98
E-mail us: info@krimson.be
QR-code Krimson Gent

Ghent

Hof ter Dampoort
Dendermondsesteenweg 48A - 101
9000 Gent, Belgium
E-mail us: info@krimson.be

Contact us

By submitting this form, you accept the Mollom privacy policy.