shorten Environment#shell code a bit

This commit is contained in:
Josh Holtrop 2014-06-11 15:31:13 -04:00
parent ae9021a505
commit 7f2b685bfb

View File

@ -362,13 +362,7 @@ module Rscons
def shell(command) def shell(command)
shell_cmd = shell_cmd =
if self["SHELL"] if self["SHELL"]
flag = self["SHELLFLAG"] || begin flag = self["SHELLFLAG"] || (self["SHELL"] == "cmd" ? "/c" : "-c")
if self["SHELL"] == "cmd"
"/c"
else
"-c"
end
end
[self["SHELL"], flag] [self["SHELL"], flag]
else else
Rscons.get_system_shell Rscons.get_system_shell