make some find_program() calls non-required in meson build

reported by wltjr
This commit is contained in:
Mike Blumenkrantz 2017-10-20 09:21:50 -04:00
parent 4d96d55c15
commit 4845823d74
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ else
SUSPEND = '/etc/acpi/sleep.sh force'
endif
else
suspend = find_program('pm-suspend', '/etc/acpi/pm-suspend', '/sbin/pm-suspend', '/usr/sbin/pm-suspend')
suspend = find_program('pm-suspend', '/etc/acpi/pm-suspend', '/sbin/pm-suspend', '/usr/sbin/pm-suspend', required: false)
if suspend.found()
SUSPEND = suspend.path()
endif
@ -41,7 +41,7 @@ else
SUSPEND = '/etc/acpi/hibernate.sh force'
endif
else
hibernate = find_program('pm-hibernate', '/etc/acpi/pm-hibernate', '/sbin/pm-hibernate', '/usr/sbin/pm-hibernate')
hibernate = find_program('pm-hibernate', '/etc/acpi/pm-hibernate', '/sbin/pm-hibernate', '/usr/sbin/pm-hibernate', required: false)
if hibernate.found()
HIBERNATE = hibernate.path()
endif

View File

@ -18,7 +18,7 @@ endif
e_version = ver.split('.')
git_version = '0'
git = find_program('git')
git = find_program('git', required: false)
if git.found() == true
git_cmd = run_command(git.path(), 'rev-list', '--count', 'HEAD')
if git_cmd.returncode() == 0