summaryrefslogtreecommitdiff
path: root/install.rb
diff options
context:
space:
mode:
authorStig Sandbeck Mathisen <ssm@debian.org>2012-01-26 11:22:40 +0100
committerStig Sandbeck Mathisen <ssm@debian.org>2012-01-26 11:22:40 +0100
commitc17b3ba16e7013f06416f10b8752ef783f048717 (patch)
tree790f13f167199b954007e17d1c55a8d1b0218775 /install.rb
parent32af6143486ceb24a93636445d1883f5fe2299d7 (diff)
downloadpuppet-upstream/2.7.10.tar.gz
Imported Upstream version 2.7.10upstream/2.7.10
Diffstat (limited to 'install.rb')
-rwxr-xr-xinstall.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/install.rb b/install.rb
index d015c4d3f..4f8469240 100755
--- a/install.rb
+++ b/install.rb
@@ -422,16 +422,12 @@ def install_binfile(from, op_file, target)
if not installed_wrapper
tmp_file2 = File.join(tmp_dir, '_tmp_wrapper')
- cwn = File.join(Config::CONFIG['bindir'], op_file)
cwv = <<-EOS
@echo off
-if "%OS%"=="Windows_NT" goto WinNT
-#{ruby} -x "#{cwn}" %1 %2 %3 %4 %5 %6 %7 %8 %9
-goto done
-:WinNT
-#{ruby} -x "#{cwn}" %*
-goto done
-:done
+setlocal
+set RUBY_BIN=%~dp0
+set RUBY_BIN=%RUBY_BIN:\\=/%
+"%RUBY_BIN%ruby.exe" -x "%RUBY_BIN%puppet" %*
EOS
File.open(tmp_file2, "w") { |cw| cw.puts cwv }
FileUtils.install(tmp_file2, File.join(target, "#{op_file}.bat"), :mode => 0755, :verbose => true)