diff options
| author | Deposite Pirate | 2026-02-16 02:22:00 +0100 |
|---|---|---|
| committer | Deposite Pirate | 2026-02-16 02:22:00 +0100 |
| commit | e5d665865e7cc800bb4deecd6aedcf3015e65b10 (patch) | |
| tree | 831b1c0adbd2aa8d2bb80ff2ae8c6bd7f4d8513d /functions/rlsxattr.fish | |
| parent | 7cfcd5a663a61e14de445426ea3f794e6b91fdda (diff) | |
Best effort dependency resolution
Add a new check_install function that checks if a tool is installed and
tries to install it on a best effort basic. Modify all scripts that
benefit from it. Small indentation and correctness fixes.
modified: functions/7za.fish
modified: functions/alert.fish
new file: functions/check_install.fish
modified: functions/lscmd.fish
modified: functions/rchmod.fish
modified: functions/renlow.fish
modified: functions/rlsxattr.fish
modified: functions/rsdos.fish
modified: functions/rsmac.fish
modified: functions/rsxattr.fish
modified: functions/uz.fish
Diffstat (limited to 'functions/rlsxattr.fish')
| -rw-r--r-- | functions/rlsxattr.fish | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/functions/rlsxattr.fish b/functions/rlsxattr.fish index 0e71e49..e52d820 100644 --- a/functions/rlsxattr.fish +++ b/functions/rlsxattr.fish @@ -1,20 +1,10 @@ function rlsxattr --description 'Recursively list all files with xattrs' -if not command -sq 'getfattr' +if not check_install 'getfattr' 'attr' echo "Can't find getfattr." return 1 end -if not command -sq 'sed' - echo "Can't find sed." - return 1 -end - -if not command -sq 'awk' - echo "Can't find awk." - return 1 -end - -getfattr -R -h -d . 2>/dev/null | grep '^# file:' | sed 's/^# file: //' +command getfattr -R -h -d . 2>/dev/null | grep '^# file:' | sed 's/^# file: //' end |
