mirror of https://github.com/mpv-player/mpv
build: unbreak __get_osslibdir__()
- without Utils.* always returns empty string - subprocess doesn't need extra quoting for sh -c - "source" is a bash'ism, not in POSIX sh - most shell commands embed newline at the end
This commit is contained in:
parent
f26fb0098f
commit
defbe48dee
|
@ -76,12 +76,14 @@ def __fail_oss_check__(ctx):
|
|||
return False
|
||||
|
||||
def __get_osslibdir__():
|
||||
from waflib import Utils
|
||||
|
||||
try:
|
||||
cmd = ['sh', '-c', "'source /etc/oss.conf && echo $OSSLIBDIR'"]
|
||||
cmd = ['sh', '-c', '. /etc/oss.conf && echo $OSSLIBDIR']
|
||||
p = Utils.subprocess.Popen(cmd, stdin=Utils.subprocess.PIPE,
|
||||
stdout=Utils.subprocess.PIPE,
|
||||
stderr=Utils.subprocess.PIPE)
|
||||
return p.communicate()[0]
|
||||
return p.communicate()[0].rstrip()
|
||||
except Exception:
|
||||
return ""
|
||||
|
||||
|
|
Loading…
Reference in New Issue