version 1.71, 2021/12/11 05:38:23 |
version 1.73, 2021/12/11 20:56:17 |
|
|
} |
} |
|
|
add_firmware () { |
add_firmware () { |
local _f="${1##*/}" _pkgdir="${DESTDIR}/var/db/pkg" |
local _f="${1##*/}" _pkgdir="${DESTDIR}/var/db/pkg/${_f%.tgz}" |
ftp -D "Install" -Vmo- "file:${1}" | |
ftp -D "Install" -Vmo- "file:${1}" | |
tar -s ",^\+,${_pkgdir}/${_f%.tgz}/+," \ |
tar -s ",^\+,${_pkgdir}/+," \ |
-s ",^firmware,${DESTDIR}/etc/firmware," \ |
-s ",^firmware,${DESTDIR}/etc/firmware," \ |
-C / -zxphf - "+*" "firmware/*" |
-C / -zxphf - "+*" "firmware/*" |
|
|
# TODO: Should we mark these so real fw_update can -Drepair? |
# TODO: Should we mark these so real fw_update can -Drepair? |
ed -s "${_pkgdir}/${_f%.tgz}/+CONTENTS" <<EOL |
ed -s "${_pkgdir}/+CONTENTS" <<EOL |
/^@comment pkgpath/ -1a |
/^@comment pkgpath/ -1a |
@option manual-installation |
@option manual-installation |
@option firmware |
@option firmware |
|
|
done |
done |
fi |
fi |
|
|
if [ ! -e "$f" ]; then |
if [ -e "$f" ]; then |
"$INSTALL" && ! "$DOWNLOAD" && |
if "$DOWNLOAD"; then |
echo "Cannot install ${f##*/}, not found" >&2 && continue |
echo "Verify existing ${f##*/}" |
|
verify "$f" || continue |
|
# else assume it was verified when downloaded |
|
fi |
|
elif "$INSTALL" && ! "$DOWNLOAD"; then |
|
echo "Cannot install ${f##*/}, not found" >&2 |
|
continue |
|
else |
fetch "$f" || continue |
fetch "$f" || continue |
verify "$f" || continue |
|
elif $DOWNLOAD; then |
|
echo "Already have $f" |
|
verify "$f" || continue |
verify "$f" || continue |
fi |
fi |
|
|