diff --git a/lib/solaar/listener.py b/lib/solaar/listener.py index 013deae6..a1a1d885 100644 --- a/lib/solaar/listener.py +++ b/lib/solaar/listener.py @@ -342,7 +342,7 @@ def _process_add(device_info: DeviceInfo, retry): except OSError as e: if e.errno == errno.EACCES: try: - output = subprocess.check_output(["/usr/bin/getfacl", "-p", device_info.path], text=True) + output = subprocess.check_output(["getfacl", "-p", device_info.path], text=True) logger.warning("Missing permissions on %s\n%s.", device_info.path, output) except Exception: pass diff --git a/release.sh b/release.sh index b2f424b1..02c48ae5 100755 --- a/release.sh +++ b/release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash repo=pwr-Solaar/Solaar diff --git a/tools/clean.sh b/tools/clean.sh index 4a1a0732..e3fea934 100755 --- a/tools/clean.sh +++ b/tools/clean.sh @@ -1,9 +1,9 @@ -#!/bin/sh +#!/usr/bin/env sh cd "$(dirname "$0")/.." find . -type f -name '*.py[co]' -delete find . -type d -name '__pycache__' -delete -/bin/rm --force po/*~ -/bin/rm --force --recursive share/locale/ +rm --force po/*~ +rm --force --recursive share/locale/ diff --git a/tools/po-compile.sh b/tools/po-compile.sh index bef6d6c2..bf7fbba0 100755 --- a/tools/po-compile.sh +++ b/tools/po-compile.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh set -e @@ -9,8 +9,8 @@ while read po_file; do language="$(basename "$po_file")" language="${language%.po}" target="$PWD/share/locale/$language/LC_MESSAGES/solaar.mo" - /bin/mkdir --parents "$(dirname "$target")" - /usr/bin/msgfmt \ + mkdir --parents "$(dirname "$target")" + msgfmt \ --check \ --output-file="$target" \ "$po_file" diff --git a/tools/po-update.sh b/tools/po-update.sh index ac7c1acd..71b2eb94 100755 --- a/tools/po-update.sh +++ b/tools/po-update.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh set -e @@ -13,7 +13,7 @@ cd "$(readlink -f "$(dirname "$0")/..")" VERSION=$(python setup.py --version) DOMAIN=$(python setup.py --name) -SOURCE_FILES=$(/bin/mktemp --tmpdir $DOMAIN-po-update-XXXXXX) +SOURCE_FILES=$(mktemp --tmpdir $DOMAIN-po-update-XXXXXX) find "lib" -name '*.py' >"$SOURCE_FILES" POT_DIR="$PWD/po" @@ -21,7 +21,7 @@ test -d "$POT_DIR" POT_FILE="$POT_DIR/$DOMAIN.pot" -/usr/bin/xgettext \ +xgettext \ --package-name "$DOMAIN" \ --package-version "$VERSION" \ --default-domain="$L_NAME" \ @@ -30,7 +30,7 @@ POT_FILE="$POT_DIR/$DOMAIN.pot" --add-comments=I18N \ --output="$POT_FILE" -/bin/sed --in-place --expression="s/charset=CHARSET/charset=UTF-8/" "$POT_FILE" +sed --in-place --expression="s/charset=CHARSET/charset=UTF-8/" "$POT_FILE" unfmt() { @@ -39,7 +39,7 @@ unfmt() { SOURCE="/usr/share/locale-langpack/$LL_CC/LC_MESSAGES/$1.mo" fi local TARGET="$(mktemp --tmpdir $1-$LL_CC-XXXXXX.po)" - /usr/bin/msgunfmt \ + msgunfmt \ --no-escape --indent \ --output-file="$TARGET" \ "$SOURCE" @@ -50,12 +50,12 @@ update_po() { local LL_CC="$1" local PO_FILE="$POT_DIR/$LL_CC.po" - test -r "$PO_FILE" || /usr/bin/msginit \ + test -r "$PO_FILE" || msginit \ --no-translator --locale="$LL_CC" \ --input="$POT_FILE" \ --output-file="$PO_FILE" - /usr/bin/msgmerge \ + msgmerge \ --update --no-fuzzy-matching \ --no-escape --indent --add-location --sort-by-file \ --lang="$LL_CC" \ @@ -63,7 +63,7 @@ update_po() { --compendium="$(unfmt gtk30-properties)" \ "$PO_FILE" "$POT_FILE" - # /bin/sed --in-place --expression="s/Language: \\\\n/Language: $L_NAME\\\\n/" "$PO_FILE" + # sed --in-place --expression="s/Language: \\\\n/Language: $L_NAME\\\\n/" "$PO_FILE" echo "Updated $PO_FILE" } diff --git a/tools/scan-registers.sh b/tools/scan-registers.sh index d981a07b..f2964ddb 100755 --- a/tools/scan-registers.sh +++ b/tools/scan-registers.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh if test -z "$1"; then echo "Use: $0 []"