Permalink
Browse files

Autotools is evil!

git-svn-id: file:///storage/svn/Estelle-ruby@28 bb408b4e-d325-0410-b1ad-a4e0c52efece
  • Loading branch information...
1 parent 1a684db commit d2f8f7dba184b2d551b0ae24ec3ef336fb781617 paul committed Aug 18, 2007
Showing with 23 additions and 35 deletions.
  1. +3 −2 Rakefile
  2. +0 −18 estelle.in
  3. +0 −5 lib/config.rb.in
  4. +19 −9 lib/platform.rb
  5. +1 −1 po/fr_FR/estelle.po
View
@@ -9,6 +9,7 @@ require 'rake/testtask'
require 'spec'
require 'build/expand'
+require 'lib/platform'
### Constants
@@ -32,7 +33,7 @@ to_expand = FileList.new '**/*.in'
desc "Process .in files"
task :expandify => to_expand do |f|
to_expand.each() do |ex|
- expand_file(ex, ex.gsub(/\.in$/, ''))
+ expand_file(ex, ex.gsub(/\.in$/, ''), ExpandFileEnvironment)
end
end
@@ -54,7 +55,7 @@ end
task :default => [
:taglib,
:updatepo,
- :expandify
+ :expandify,
]
View
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-prefix=@prefix@
-libdir=@expanded_libdir@
-exec_rb="main.rb"
-
-if [ -e "./lib/$exec_rb" ] && [ -e ./Makefile ] ; then
- RUBY_SCRIPT="./lib/$exec_rb"
- export RUBYLIB="./taglib-ruby/.libs"
-
- echo "*** Warning - Running UNINSTALLED $exec_rb ***"
-else
- RUBY_SCRIPT="@expanded_libdir@/@PACKAGE@/$exec_rb"
-fi
-
-exec @RUBY@ $RUBY_SCRIPT "$@"
-
-
View
@@ -1,5 +0,0 @@
-module Config
- Package = "@PACKAGE@"
- Version = "@VERSION@"
- Prefix = "@prefix@"
-end
View
@@ -19,26 +19,36 @@
###########################################################################
# Standard library
+require 'rubygems'
require 'logger'
require 'gettext'
include GetText
module Platform
- def Platform.os
+class << self
+
+ def os
return :linux if RUBY_PLATFORM =~ /linux/
return :windows if RUBY_PLATFORM =~ /win/
return :solaris if RUBY_PLATFORM =~ /solaris/
return :bsd if RUBY_PLATFORM =~ /bsd/
+ return :osx if RUBY_PLATFORM =~ /darwin/
end
- def Platform.settings_file_path
- #case os
- # FIXME: Windows is so lame
- #when :windows
- #else
- homedir = (ENV["HOME"] ? ENV["HOME"] : ".")
- File.join(homedir, ".estelle")
- #end
+ def home_dir
+ # FIXME: This is clearly wrong
+ return 'C:\temp' if :windows
+
+ homedir = (ENV["HOME"] ? ENV["HOME"] : ".")
+ File.join(homedir, ".estelle")
+ end
+
+ def which(program)
+ # FIXME: This is also clearly wrong
+ return "" if :windows
+
+ return `which #{program}`
end
+end # Class << self
end
View
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: estelle 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-07-25 21:55-0700\n"
+"POT-Creation-Date: 2007-08-17 21:10-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

0 comments on commit d2f8f7d

Please sign in to comment.