diff options
author | Matt Turner <mattst88@gentoo.org> | 2020-10-19 19:48:07 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2020-10-20 16:26:35 -0700 |
commit | e96ef61854ae6f85f90dc9f5e01b5e1743c8a6f6 (patch) | |
tree | 9f079c5ee05e2df528b6a75687a29ccf5f7bd4bf | |
parent | targets: Remove unnecessary CONFIG_PROTECT assignment (diff) | |
download | catalyst-e96ef61854ae6f85f90dc9f5e01b5e1743c8a6f6.tar.gz catalyst-e96ef61854ae6f85f90dc9f5e01b5e1743c8a6f6.tar.bz2 catalyst-e96ef61854ae6f85f90dc9f5e01b5e1743c8a6f6.zip |
targets: Use double-brackets in kmerge.sh
Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rwxr-xr-x | targets/support/kmerge.sh | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh index 5e284183..fb67aba6 100755 --- a/targets/support/kmerge.sh +++ b/targets/support/kmerge.sh @@ -15,71 +15,51 @@ genkernel_compile() { --minkernpackage=/tmp/kerncache/${kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 all ) # extra genkernel options that we have to test for - if [ -n "${clst_gk_mainargs}" ] - then + if [[ -n ${clst_gk_mainargs} ]]; then GK_ARGS+=(${clst_gk_mainargs}) fi - if [ -n "${clst_KERNCACHE}" ] - then + if [[ -n ${clst_KERNCACHE} ]]; then GK_ARGS+=(--kerncache=/tmp/kerncache/${kname}-kerncache-${clst_version_stamp}.tar.bz2) fi - if [ -e /var/tmp/${kname}.config ] - then + if [[ -e /var/tmp/${kname}.config ]]; then GK_ARGS+=(--kernel-config=/var/tmp/${kname}.config) fi - - if [ -d "/tmp/initramfs_overlay/${initramfs_overlay}" ] - then + if [[ -d /tmp/initramfs_overlay/${initramfs_overlay} ]]; then GK_ARGS+=(--initramfs-overlay=/tmp/initramfs_overlay/${initramfs_overlay}) fi - if [ -n "${clst_CCACHE}" ] - then + if [[ -n ${clst_CCACHE} ]]; then GK_ARGS+=(--kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc) fi - - if [ -n "${clst_linuxrc}" ] - then + if [[ -n ${clst_linuxrc} ]]; then GK_ARGS+=(--linuxrc=/tmp/linuxrc) fi - - if [ -n "${clst_busybox_config}" ] - then + if [[ -n ${clst_busybox_config} ]]; then GK_ARGS+=(--busybox-config=/tmp/busy-config) fi - - if [ "${clst_target}" == "netboot" ] - then + if [[ ${clst_target} == netboot ]]; then GK_ARGS+=(--netboot) - if [ -n "${clst_merge_path}" ] - then + if [[ -n ${clst_merge_path} ]]; then GK_ARGS+=(--initramfs-overlay="${clst_merge_path}") fi fi - - if [ -n "${clst_VERBOSE}" ] - then + if [[ -n ${clst_VERBOSE} ]]; then GK_ARGS+=(--loglevel=2) fi - # Build with genkernel using the set options - # callback is put here to avoid escaping issues - if [ -n "${clst_VERBOSE}" ] - then + if [[ -n ${clst_VERBOSE} ]]; then gk_callback_opts=(-vN) else gk_callback_opts=(-qN) fi - if [ -n "${clst_KERNCACHE}" ] - then + if [[ -n ${clst_KERNCACHE} ]]; then gk_callback_opts+=(-kb) fi - if [ -n "${clst_FETCH}" ] - then + if [[ -n ${clst_FETCH} ]]; then gk_callback_opts+=(-f) fi - if [ "${kernel_merge}" != "" ] - then + + if [[ -n ${kernel_merge} ]]; then genkernel --callback="emerge ${gk_callback_opts[@]} ${kernel_merge}" \ "${GK_ARGS[@]}" || exit 1 else |