Skip to content

Commit

Permalink
mkinitramfs-ll.{ba,z}sh: 0.15.1 version bump: added firmware regex su…
Browse files Browse the repository at this point in the history
…pport
  • Loading branch information
tokiclover committed Jan 4, 2015
1 parent 7682426 commit f5f3d13
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 7 additions & 6 deletions mkinitramfs-ll.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# $Header: mkinitramfs-ll/mkinitramfs-ll.bash Exp $
# $Author: (c) 2011-2014 -tclover <[email protected]> Exp $
# $License: 2-clause/new/simplified BSD Exp $
# $Version: 0.15.0 2014/12/30 12:33:03 Exp $
# $Version: 0.15.1 2014/01/01 12:33:03 Exp $
#

typeset -A PKG
Expand Down Expand Up @@ -334,13 +334,14 @@ if [[ "${opts[-F]}" ]] || [[ "${opts[-firmware]}" ]]; then
mkdir -p lib/firmware
for f in ${opts[-F]//:/ } ${opts[-firmware]//:/ }; do
if [[ -e ${f} ]]; then
cp -a $f lib/firmware/ || warn "failed to copy $f firmware"
elif [[ -e /lib/firmware/${f} ]]; then
cp -a {/,}lib/firmware/$f || warn "failed to copy $f firmware"
else
warn "failed to copy $f firmware"
firmware+=(${f})
else
firmware+=(/lib/firmware/*${f}*)
mkdir -p .${firmware[$((${#firmware[@]}-1))]%/*}
fi
done
cp -a "${firmware[@]}" lib/firmware/
unset firmware
fi

for bin in dmraid mdadm zfs; do
Expand Down
11 changes: 6 additions & 5 deletions mkinitramfs-ll.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# $Header: mkinitramfs-ll/mkinitramfs-ll.zsh Exp $
# $Author: (c) 2011-2014 -tclover <[email protected]> Exp $
# $License: 2-clause/new/simplified BSD Exp $
# $Version: 0.15.0 2014/12/30 12:33:03 Exp $
# $Version: 0.15.1 2015/01/01 12:33:03 Exp $
#

typeset -A PKG
Expand Down Expand Up @@ -331,13 +331,14 @@ if (( ${+opts[-F]} || ${+opts[-firmware]} )) {
mkdir -p lib/firmware
for f (${(pws,:,)opts[-F]} ${(pws,:,)opts[-firmware]}) {
if [[ -e ${f} ]] {
cp -a $f lib/firmware/ || warn "failed to copy $f firmware"
} elif [[ -e /lib/firmware/${f} ]] {
cp -a {/,}lib/firmware/$f || warn "failed to copy $f firmware"
firmware+=(${f})
} else {
warn "failed to copy $f firmware"
firmware+=(/lib/firmware/*${f}*(N))
mkdir -p .${firmware[${#firmware}]:h}
}
}
cp -a ${firmware} lib/firmware/
unset firmware
}

if [[ -x usr/bin/busybox ]] {
Expand Down

0 comments on commit f5f3d13

Please sign in to comment.