diff options
author | 2015-04-02 22:53:14 +1100 | |
---|---|---|
committer | 2015-04-02 22:53:14 +1100 | |
commit | 453fd07fa0e0ca4318a379b87a3458298e3a1d0d (patch) | |
tree | c1093de809c212dec14c59f2f930f70018efd6dc /scripts/src/osd/modules.lua | |
parent | a63bd12019fe1452ba6a6cac03281e15eb0eb685 (diff) |
Add a nice wrapper for doing backtick-like processing of command output
Diffstat (limited to 'scripts/src/osd/modules.lua')
-rw-r--r-- | scripts/src/osd/modules.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index ca68f1af83d..c8e1efee2c9 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -107,11 +107,11 @@ function osdmodulesbuild() configuration { } elseif _OPTIONS["targetos"]=="macosx" then buildoptions { - "-F" .. string.gsub(os.outputof("qmake -query QT_INSTALL_LIBS"), '[\r\n]+', ''), + "-F" .. backtick("qmake -query QT_INSTALL_LIBS"), } else buildoptions { - string.gsub(os.outputof("pkg-config --cflags QtGui"), '[\r\n]+', ' '), + backtick("pkg-config --cflags QtGui"), } end else @@ -146,7 +146,7 @@ function osdmodulestargetconf() if _OPTIONS["NO_USE_MIDI"]~="1" then if _OPTIONS["targetos"]=="linux" then linkoptions { - string.gsub(os.outputof("pkg-config --libs alsa"), '[\r\n]+', ' '), + backtick("pkg-config --libs alsa"), } elseif _OPTIONS["targetos"]=="macosx" then links { @@ -168,7 +168,7 @@ function osdmodulestargetconf() } elseif _OPTIONS["targetos"]=="macosx" then linkoptions { - "-F" .. string.gsub(os.outputof("qmake -query QT_INSTALL_LIBS"), '[\r\n]+', ''), + "-F" .. backtick("qmake -query QT_INSTALL_LIBS"), } links { "QtCore.framework", @@ -176,7 +176,7 @@ function osdmodulestargetconf() } else linkoptions { - string.gsub(os.outputof("pkg-config --libs QtGui"), '[\r\n]+', ' '), + backtick("pkg-config --libs QtGui"), } end end |