On Debian-based systems, the `rev` command is shipped by the
bsdextrautils package. Replace the `rev` command by `sed` which is an
essential command and does not need additional packages.
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -o Dpkg::Use-Pty=0 \
asciidoctor \
bluez \
- bsdextrautils \
btrfs-progs \
ca-certificates \
cargo \
# only set -kernel if -initrd is specified
initrd=$(get_initrd "${ARGS[@]}")
if [[ -n $initrd ]]; then
- KVERSION=$(lsinitrd "$initrd" | grep modules.dep | head -1 | rev | cut -d'/' -f2 | rev)
+ KVERSION=$(lsinitrd "$initrd" | grep modules.dep | head -1 | sed 's;.*/\([^/]\+\)/modules.dep;\1;')
set_vmlinux_env
ARGS+=(-kernel "$VMLINUZ")
add_to_append "console=${console:-ttyS0},115200"
}
determine_kernel_version() {
- lsinitrd "$1" | grep modules.dep | head -1 | rev | cut -d'/' -f2 | rev
+ lsinitrd "$1" | grep modules.dep | head -1 | sed 's;.*/\([^/]\+\)/modules.dep;\1;'
}
determine_kernel_image() {