File.stat().writable? yields false on sshfs writable directories
[booh] / lib / booh / pre-setup.rb
1 # Copyright (C) 2004-2005 Masao Mutoh, Laurent Sansonetti 
2
3 copyright = <<EOS
4 # This file is automatically generated by the installer.
5 # Do not edit by hands.
6 EOS
7
8 File.open('config.rb', 'w') do |file|
9     file.print <<EOS
10
11 module Booh
12     $FPATH = '#{config('data-dir')}/booh'
13 end
14 EOS
15 end
16
17 File.open('version.rb', 'w') do |file|
18     begin
19         version = IO.readlines('../../VERSION').join.chomp
20     rescue Errno::ENOENT
21         version = "dev"
22     end
23     file.print <<EOS
24 # This file is automatically generated by the installer.
25 # Do not edit by hands.
26
27 module Booh
28     $VERSION = "#{version}"
29 end
30 EOS
31 end