Update static shebangs to flexible /usr/bin/env

* Also fixes static /bin/chmod executable call in UDEV rules
* Resolves #4166
This commit is contained in:
Chris M 2024-06-19 17:54:27 +10:00
parent 72507ea108
commit 15c3d8591c
4 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# -e is not set should this step fail for whatever reason the installation is still valid # -e is not set should this step fail for whatever reason the installation is still valid
set -u -o pipefail set -u -o pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
# OpenRGB AppImage Build Script # # OpenRGB AppImage Build Script #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
PROJECT_FILE="OpenRGB.pro" PROJECT_FILE="OpenRGB.pro"
VERSION_PATTERN="__VERSION__" VERSION_PATTERN="__VERSION__"
INFILE_SUFFIX=".in" INFILE_SUFFIX=".in"

View file

@ -30,14 +30,14 @@ UDEV_HEADER+=${UDEV_LINE}'# Super I/O Access
ASUS_TUF_DEVICES=('blue' 'flags' 'green' 'mode' 'red' 'set' 'speed') ASUS_TUF_DEVICES=('blue' 'flags' 'green' 'mode' 'red' 'set' 'speed')
UDEV_HEADER+=${UDEV_LINE}'# ASUS TUF Laptops (faustus) #\n'${UDEV_LINE} UDEV_HEADER+=${UDEV_LINE}'# ASUS TUF Laptops (faustus) #\n'${UDEV_LINE}
for DEV in ${ASUS_TUF_DEVICES[@]}; do for DEV in ${ASUS_TUF_DEVICES[@]}; do
UDEV_HEADER+='ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/bin/chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_'${DEV}'"\n' UDEV_HEADER+='ACTION=="add", SUBSYSTEM=="platform", KERNEL=="faustus", RUN+="/usr/bin/env chmod a+w /sys/bus/platform/devices/%k/kbbl/kbbl_'${DEV}'"\n'
done done
# asus-wmi rules # asus-wmi rules
ASUS_WMI_DEVICES=('kbd_rgb_mode' 'brightness') ASUS_WMI_DEVICES=('kbd_rgb_mode' 'brightness')
UDEV_HEADER+='\n'${UDEV_LINE}'# ASUS TUF Laptops (asus-wmi) #\n'${UDEV_LINE} UDEV_HEADER+='\n'${UDEV_LINE}'# ASUS TUF Laptops (asus-wmi) #\n'${UDEV_LINE}
for DEV in ${ASUS_WMI_DEVICES[@]}; do for DEV in ${ASUS_WMI_DEVICES[@]}; do
UDEV_HEADER+='ACTION=="add", SUBSYSTEM=="leds", KERNEL=="asus::kbd_backlight", RUN+="/bin/chmod a+w /sys%p/'${DEV}'"\n' UDEV_HEADER+='ACTION=="add", SUBSYSTEM=="leds", KERNEL=="asus::kbd_backlight", RUN+="/usr/bin/env chmod a+w /sys%p/'${DEV}'"\n'
done done
echo -e "$UDEV_HEADER" > "$UDEV_FILE" echo -e "$UDEV_HEADER" > "$UDEV_FILE"