Categories
Tech

Parse Command Line Options with annotations

Panzi has written a very nice Lib to parse command line options in Java. You can just add Annotations to your Java fields and they will be filled automagically with the command line values.

Eine sehr nützliche Lib um Kommandozeilen in Java zu Parsen hat Panzi in seinem Blog beschrieben. Dazu werden die Felder im Java Code einfach mit bestimmten Annotations versehen und die Lib kümmert sich um das Parsing und schreibt die Werte direkt in die Felder.

Categories
Tech

WordPress on Ubuntu Intrepid

Es ist sehr leicht WordPress 2.5 unter Ubuntu Intrepid zu installieren. Damit hat man dann auch sofort Multiblog-Fähigkeiten. Es gibt dazu ein Beispielscript (/usr/share/doc/wordpress/examples/setup-mysql) um neue Instanzen anzulegen. Allerdings ist das von Debian kopiert und einige Pfadangaben passen nicht für Ubuntu. Das folgende diff behebt das. Getestet mit wordpress-2.5.1-2ubuntu1.

Its pretty easy to install WordPress 2.5 on Ubuntu Intrepid. The Ubuntu version comes with Multiblog capabilities included. There is an example script (/usr/share/doc/wordpress/examples/setup-mysql) to create new instances of WordPress Blogs. Unfortunatly the script was copied from Debian and some paths are wrong for Ubuntu. The script below fixes that issue. After that it worked flawlessly for me with wordpress-2.5.1-2ubuntu1.

 

82,83c82,83
< [ -d /srv/www ] || mkdir -p /srv/www
 [ -d /var/www ] || mkdir -p /var/www
> ln -s /usr/share/wordpress /var/www/$DOMAIN
149c149
 UPLOAD="/var/www/wp-uploads/$DOMAIN"
181a182
>