aboutsummaryrefslogtreecommitdiffstats
path: root/core/boot
diff options
context:
space:
mode:
authorToshiaki Asai <toshi.alternative@gmail.com>2013-03-22 10:35:19 +0900
committerToshiaki Asai <toshi.alternative@gmail.com>2013-03-22 10:35:19 +0900
commit22406ba0895632414ff1fd995babb1d86880b2f1 (patch)
treeeb4ca40948be59c37702bf007a466cd8e0c68db7 /core/boot
parente7dd41dbafbc5460052c855b80ede1013b9203fa (diff)
downloadmikutter-22406ba0895632414ff1fd995babb1d86880b2f1.tar.gz
カレントディレクトリがどこになっても動くようにした
Diffstat (limited to 'core/boot')
-rw-r--r--core/boot/load_plugin.rb2
-rw-r--r--core/boot/option.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/boot/load_plugin.rb b/core/boot/load_plugin.rb
index 8f27e83e..2517d429 100644
--- a/core/boot/load_plugin.rb
+++ b/core/boot/load_plugin.rb
@@ -2,7 +2,7 @@
# プラグインを全てロードする
miquire :core, 'plugin'
-Miquire::Plugin.loadpath << 'plugin' << '../plugin' << File.join(Environment::CONFROOT, 'plugin')
+Miquire::Plugin.loadpath << File.join(File.dirname(__FILE__), "..", "plugin") << File.join(File.dirname(__FILE__), "..", "..", "plugin") << File.join(Environment::CONFROOT, 'plugin')
spec_unsupported = []
Miquire::Plugin.each{ |path|
spec_filename = File.join(File.dirname(path), "spec")
diff --git a/core/boot/option.rb b/core/boot/option.rb
index 387a2c74..2c9ff410 100644
--- a/core/boot/option.rb
+++ b/core/boot/option.rb
@@ -29,7 +29,7 @@ module Mopt
Process.daemon(true) }
opt.on('--clean', 'delete all caches and duplicated files') { |v|
require 'fileutils'
- require File.expand_path('utils')
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", 'utils'))
miquire :core, 'environment'
puts "delete "+File.expand_path(Environment::TMPDIR)
FileUtils.rm_rf(File.expand_path(Environment::TMPDIR))
@@ -50,7 +50,7 @@ module Mopt
opt.parse!(ARGV)
if ARGV[0]
- require File.expand_path('utils')
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", 'utils'))
miquire :boot, 'check_config_permission'
file = File.expand_path("boot/shell/#{ARGV[0]}.rb")
if FileTest.exist?(file)