30th Januar 2010, 06:38 pm
Short – but unfortunatly to long for Twitter. With this little snippet you can get all commits from an svn working copy, repository or from a pure log:
svn log | ruby -e "puts STDIN.read.split(/\n/).select{|l| l =~ /^r\d+/}.map{|l| l.split('|')[1].strip}.uniq.sort"
Who has any guess why I did need this?
24th Januar 2010, 03:59 pm
After DokuWiki has been released multiple times in the last few days because of security problems, I though it was a good time, to write a little script for automatically updating multiple instances. You can find the ruby script at http://gist.github.com/285219.
The ruby script basically automates the upgrade instructions from the DokuWiki main page. So the following actions are performed when executing the script:
- Making a backup into /tmp/dokuwiki_backup_#{timestamp} of every installation.
- Downloading the dokuwiki release (passed in as a parameter).
- Extracting the files and copying everything to the installations (execept for the content of the /data directory).
- Creating missing folders in the /data directory, making the owner www-data:www-data and chmodding them to 664.
- Deleting files from a list of file from older revisions.
Within the script you need to specifiy this snipped for setting your DokuWiki installations:
# Definition of existing installation
INSTALLATIONS = [
'/path/to/docu/wiki/installation1',
'/path/to/docu/wiki/installation2'
].freeze
Then you can call for a new release as follows:
/path/to/script/upgrade_dokuwiki.rb http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2009-12-25c.tgz
If you want to improve the script, feel free to fork me on Gist.