mirror of https://github.com/nirenjan/libx52.git
Update paths of scripts to allow building on BSD
Prior to this change, the assumption in all shell and Python scripts was that the Bash interpreter would always be available at `/bin/bash`, and Python would always be available at `/usr/bin/python`. However, on a VM running FreeBSD, installing bash and python using the pkg command installs them under /usr/local/bin. This change updates the paths to use /usr/bin/env in the shebang. While this is not a standard path either, it is more likely to be available at this location. This change also updates the find command in common_infra.sh to use `-perm -+x` in lieu of `-executable`, which is not a condition defined by POSIX. This allows running the tests on BSD.pull/22/head
parent
21a5da3c70
commit
e1915bc734
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# Character map generator
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
|
|
|
@ -79,7 +79,7 @@ find_programs()
|
|||
fi
|
||||
|
||||
# Find the X52cli script
|
||||
X52CLI=$(find .. -path '*/cli/x52cli' -executable)
|
||||
X52CLI=$(find .. -path '*/cli/x52cli' -perm -+x)
|
||||
|
||||
if [[ -z "$X52CLI" ]]
|
||||
then
|
||||
|
@ -87,14 +87,14 @@ find_programs()
|
|||
fi
|
||||
|
||||
# Find the x52test_log_actions program
|
||||
X52LOGACT=$(find .. -path '*/libusbx52/x52test_log_actions' -executable)
|
||||
X52LOGACT=$(find .. -path '*/libusbx52/x52test_log_actions' -perm -+x)
|
||||
if [[ -z "$X52LOGACT" ]]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Find the x52test_create_device_list program
|
||||
X52DEVLIST=$(find .. -path '*/libusbx52/x52test_create_device_list' -executable)
|
||||
X52DEVLIST=$(find .. -path '*/libusbx52/x52test_create_device_list' -perm -+x)
|
||||
if [[ -z "$X52DEVLIST" ]]
|
||||
then
|
||||
exit 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# MFD & LED brightness tests
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# Clock tests
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# Indicator (blink & shift) tests
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# LED tests
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# MFD tests
|
||||
#
|
||||
# Copyright (C) 2012-2018 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# Timezone tests
|
||||
#
|
||||
# Copyright (C) 2020 Nirenjan Krishnan (nirenjan@nirenjan.org)
|
||||
|
|
Loading…
Reference in New Issue