use globbing instead of find

This commit is contained in:
Dennis Eriksen 2024-10-10 16:00:50 +02:00
parent 4d1b0e164e
commit 24897def28
2 changed files with 3 additions and 3 deletions

View File

@ -74,6 +74,7 @@ app_setup_block: |
readme_hwaccel: true
# changelog
changelogs:
- {date: "10.10.24:", desc: "Use globbing instead of find"}
- {date: "18.07.24:", desc: "Rebase to Ubuntu Noble."}
- {date: "12.02.24:", desc: "Use universal hardware acceleration blurb"}
- {date: "09.01.24:", desc: "Set ownership on TranscoderTempDirectory when it's been saved in Preferences."}

View File

@ -1,9 +1,8 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
FILES=$(find /dev/dri /dev/dvb -type c -print 2>/dev/null)
for i in ${FILES}; do
for i in /dev/dri/* /dev/dvb; do
[[ -c "${i}" ]] || continue
VIDEO_GID=$(stat -c '%g' "${i}")
VIDEO_UID=$(stat -c '%u' "${i}")
# check if user matches device