Permalink
Browse files

Actually use the target dir

  • Loading branch information...
1 parent b9b8b58 commit bca51d5654446bb75566ac88030a49e7df75d794 @iain committed Jan 26, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 thor.rb
View
@@ -54,7 +54,7 @@ def source
end
def target
- root.join(SOURCE)
+ root.join(TARGET)
end
def process_loose_file(file)
@@ -71,7 +71,7 @@ def process_directory(dir)
_compile(
command: "coffee -o tmp --join --compile src/#{dir}/**/*.coffee",
source: "tmp/concatenation.js",
- target: dir.to_s + '.js',
+ target: target.join(dir.to_s + '.js'),
message: "\e[032mcompiled\e[0;90m '\e[0m%{target}\e[0;90m'\e[0m"
)
end
@@ -85,7 +85,8 @@ def _compile(args = {})
end
stderr = stderr.read
if stderr == ""
- system "mv #{args[:source]} #{args[:target]}"
+ mv = [ "mv", args[:source], args[:target] ].map(&:to_s)
+ system *mv
msg = args[:message] % args
puts "\e[0;90m#{Time.now} #{msg}"
notify false, "Success: #{File.basename(args[:target])}", msg.gsub(/\e\[[^m]+m/,'')

0 comments on commit bca51d5

Please sign in to comment.