Permalink
Browse files

elf2pkgs: add recursion for directories

  • Loading branch information...
1 parent 242df7b commit 9bab6559a7220f3d77c8035c1a0f647b0ca09f0f @falconindy committed Aug 19, 2014
Showing with 13 additions and 1 deletion.
  1. +13 −1 elf2pkgs
View
@@ -23,6 +23,18 @@ resolve_bin() {
done | pacman -Qqo - 2>/dev/null
}
+resolve_dir() {
+ local bin
+
+ while read -rd '' bin; do
+ resolve_bin "$bin"
+ done < <(find "$1" -type f -executable -print0)
+}
+
for bin; do
- resolve_bin "$bin"
+ if [[ -f $bin ]]; then
+ resolve_bin "$bin"
+ elif [[ -d $bin ]]; then
+ resolve_dir "$bin"
+ fi
done | sort -u

0 comments on commit 9bab655

Please sign in to comment.