From dfcd11c549897cbaa65a31f750622083c69af621 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sun, 7 Oct 2018 08:07:43 +0000 Subject: [PATCH] Add quotes to toml config --- tools/kernel-factory/bootstrap.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/kernel-factory/bootstrap.sh b/tools/kernel-factory/bootstrap.sh index aa2714f..a4b6e87 100755 --- a/tools/kernel-factory/bootstrap.sh +++ b/tools/kernel-factory/bootstrap.sh @@ -12,15 +12,16 @@ find | grep Docker | sed 's/Dockerfile//' | while read DOCKER; do BOOT_FILES="$(docker run $CONTAINER_NAME ls /boot)" for KERNEL_RELEASE in $(docker run $CONTAINER_NAME ls /lib/modules); do echo '[[Kernels]]' >> output/kernels.toml - echo 'distro_type =' $DISTRO_NAME >> output/kernels.toml - echo 'distro_release =' $DISTRO_VER >> output/kernels.toml - echo 'kernel_release =' $KERNEL_RELEASE >> output/kernels.toml - echo 'container_name =' $CONTAINER_NAME >> output/kernels.toml + echo 'distro_type =' \"$DISTRO_NAME\" >> output/kernels.toml + echo 'distro_release =' \"$DISTRO_VER\" >> output/kernels.toml + echo 'kernel_release =' \"$KERNEL_RELEASE\" >> output/kernels.toml + echo 'container_name =' \"$CONTAINER_NAME\" >> output/kernels.toml KERNEL_PATH=$(echo $BOOT_FILES | sed 's/ /\n/g' | grep $KERNEL_RELEASE | grep vmlinuz) - echo 'kernel_path =' $(realpath output/$KERNEL_PATH) >> output/kernels.toml + echo 'kernel_path =' \"$(realpath output/$KERNEL_PATH)\" >> output/kernels.toml INITRD_PATH=$(echo $BOOT_FILES | sed 's/ /\n/g' | grep $KERNEL_RELEASE | grep init) - echo 'initrd_path =' $(realpath output/$INITRD_PATH) >> output/kernels.toml - echo 'root_f_s =' $ROOTFS_PATH >> output/kernels.toml + echo 'initrd_path =' \"$(realpath output/$INITRD_PATH)\" >> output/kernels.toml + ROOTFS_PATH=$(realpath $DOCKER/Image) + echo 'root_f_s =' \"$ROOTFS_PATH\" >> output/kernels.toml echo >> output/kernels.toml done done