Skip to content

Commit

Permalink
mkinitramfs-ll.{ba,z}sh: minor binary adding fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tokiclover committed Nov 2, 2014
1 parent dd76635 commit c555693
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions mkinitramfs-ll.bash
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,7 @@ for bin in ${opts[-b]//:/ } ${opts[-bin]//:/ }; do
[[ -x ${b} ]] && continue 2
done

[[ -x ${bin} ]] && dobin ${bin}
binary=$(type -p ${bin})
[[ -x ${bin} ]] && binary=${bin} || binary=$(type -p ${bin})
[[ "${binary}" ]] && dobin ${binary} || warn "no ${bin} binary found"
binary=
done
Expand Down
7 changes: 4 additions & 3 deletions mkinitramfs-ll.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,11 @@ function dobin {
for bin (${(pws,:,)opts[-b]} ${(pws,:,)opts[-bin]}) {
for b ({usr/,}{,s}bin/${bin}) { [[ -x ${b} ]] && continue 2 }

[[ -x ${bin} ]] && dobin ${bin}
(( ${+commands[$bin]} )) && dobin ${commands[$bin]} ||
warn "no ${bin} binary found"
[[ -x ${bin} ]] && binary=${bin} || binary=${commands[$bin]}
[[ -n ${binary} ]] && dobin ${binary} || warn "no ${bin} binary found"
binary=
}
unset -v binary

# Remove module group name from boot group before processing module groups
for mod (${(pws,:,)opts[-mboot]})
Expand Down

0 comments on commit c555693

Please sign in to comment.