A few suffix fixes.

pull/15/head
Jussi Pakkanen 10 years ago
parent 263c917c6a
commit dcdfb7e3ba
  1. 2
      dependencies.py
  2. 2
      meson_install.py

@ -137,7 +137,7 @@ class ExternalProgram():
self.fullpath = [shutil.which(name)]
if self.fullpath[0] is None and search_dir is not None:
trial = os.path.join(search_dir, name)
suffix = os.path.splitext(trial)[-1].lower()
suffix = os.path.splitext(trial)[-1].lower()[1:]
if environment.is_windows() and (suffix == 'exe' or suffix == 'com'\
or suffix == 'bat'):
self.fullpath = [trial]

@ -107,7 +107,7 @@ def run_install_script(d):
script = d.install_script
print('Running custom install script %s' % script)
suffix = os.path.splitext(script)[1].lower()
if platform.system().lower() == 'windows' and suffix != 'bat':
if platform.system().lower() == 'windows' and suffix != '.bat':
first_line = open(script).readline().strip()
if first_line.startswith('#!'):
commands = first_line[2:].split('#')[0].strip().split()

Loading…
Cancel
Save