dbq: use null-terminated strings for xargs

This commit is contained in:
John McQuah 2023-01-09 14:50:04 -05:00
parent 1838c8dc05
commit 66d26ea85f
1 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
# Shell: sh
# Author: John McQuah
target=$1
target="$1"
fullpath="$2/$target"
if [ -r "$target" ]; then
@ -14,6 +14,6 @@ if [ -r "$target" ]; then
[ -f "$target" ] && deadbeef --queue -- "$fullpath" 2>/dev/null
[ -d "$target" ] && find "$fullpath" -iname "*.mp3" \
-o -iname "*.ogg" -o -iname "*.flac" \
-o -iname "*.m4a" -o -iname "*.mid" -print0 \
| sort -z | xargs deadbeef --queue -- 2>/dev/null
-o -iname "*.m4a" -print0 | sort -z \
| xargs -0 deadbeef --queue -- 2>/dev/null
fi