# we are using the fact that this is a sourced sh script to take over and # handle updating ourselves. config is static and does not need changes. version=$version-mod verbose=0 # replicate existing script everbose() { if [ "$verbose" = "0" ]; then return fi echo $* } ewarn() { echo "WARNING:" $@ >&2 } eerror() { echo "ERROR:" $@ >&2 return 1 } usage() { echo "usage: $0 [-v|--verbose] [--warn-only]" } # NOTE: no-op for most options while [ $# -gt 0 ]; do opt="$1" shift case "$opt" in -v|--verbose) verbose=1 ;; --warn-only) warn_only=1 ;; --) break ;; -*) usage exit 1 ;; esac done src=/usr/share/syslinux/efi64 boot=/boot/EFI/Boot everbose "Installing binaries from $src to $boot" cp $src/*.c32 $src/ldlinux.e64 $boot cp $src/syslinux.efi $boot/bootx64.efi ids=/usr/share/hwdata/pci.ids bootids=hdt/pci.ids apkargs="-q --no-progress" if ! apk info -e hwids-pci >/dev/null; then everbose "Installing hwids-pci" if apk $apkargs add hwids-pci; then undo_hwids=1 else ewarn $(cat <