Skip to content

Commit 4e3ae5f

Browse files
authored
Merge pull request #57 from vimproved/kernel-install-fixup
feat(kernel-install): port to POSIX sh, fixups
2 parents dfc3d45 + d534bc4 commit 4e3ae5f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
COMMAND="${1:?}"
44
KERNEL_VERSION="${2:?}"
55

66
# Do not attempt to create initramfs if the supplied image is already a UKI
7-
[[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]] && exit 0
7+
[ "${KERNEL_INSTALL_IMAGE_TYPE}" = "uki" ] && exit 0
88

99
# Only run if the initrd generator is ugrd
10-
[[ ${KERNEL_INSTALL_INITRD_GENERATOR} == "ugrd" ]] || exit 0
10+
[ "${KERNEL_INSTALL_INITRD_GENERATOR}" = "ugrd" ] || exit 0
1111

1212
# only run when the COMMAND is add, and fewer than 5 arguments are passed
13-
[[ "$COMMAND" == "add" || "$#" -lt 5 ]] || exit 0
13+
[ "${COMMAND}" = "add" ] && [ "${#}" -lt 5 ] || exit 0
1414

15-
ugrd "$([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --debug)" --no-rotate --kver "$KERNEL_VERSION" "$KERNEL_INSTALL_STAGING_AREA/initrd" || exit 1
15+
ugrd "$([ "${KERNEL_INSTALL_VERBOSE}" = 1 ] && echo --debug)" --no-rotate --kver "${KERNEL_VERSION}" "${KERNEL_INSTALL_STAGING_AREA}/initrd" || exit 1

0 commit comments

Comments
 (0)