From f3c8551cd90c440ede8618e3a225e466a2365c19 Mon Sep 17 00:00:00 2001 From: Thijs Date: Tue, 9 Jun 2026 20:41:31 +0200 Subject: [PATCH] feat(export): also export /usr/sbin binaries `towel_repoquery_exportables` and `towel_auto_export` only matched `/usr/bin/...`, so executables a package installs into `/usr/sbin` were never exported. Broaden both patterns to `/usr/s?bin/` so binaries in either location are picked up. The generated wrapper already execs the binary by its full path, so `/usr/sbin` targets work unchanged. `/usr/bin` matching is unaffected. Closes #14 --- user/local/share/towel/bin/towel-common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/local/share/towel/bin/towel-common b/user/local/share/towel/bin/towel-common index 167ecf8..10c522d 100755 --- a/user/local/share/towel/bin/towel-common +++ b/user/local/share/towel/bin/towel-common @@ -162,7 +162,7 @@ function towel_export_desktop_wrapper() { function towel_repoquery_exportables() { local pkg="$1" - local bins_regex='/usr/bin/\S+' + local bins_regex='/usr/s?bin/\S+' local desktops_regex='/usr/share/applications/\S+\.desktop' dnf repoquery -l "$pkg" 2>/dev/null | grep -oE '^('"$bins_regex"'|'"$desktops_regex"')$' 2>/dev/null | sort -u @@ -190,7 +190,7 @@ function towel_auto_export() { fi local bin_files - bin_files=$(grep -E '^/usr/bin/\S+$' <<<"$files") || true + bin_files=$(grep -E '^/usr/s?bin/\S+$' <<<"$files") || true if [ -n "$bin_files" ]; then while IFS= read -r bin_file; do if [ -e "$bin_file" ]; then