From 8a37703ab4c7588b850d80ae6c4c531f1b6595b2 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Sun, 2 Jul 2017 18:24:32 +0000 Subject: [PATCH] Fix code style --- stage0/13-image/00-run.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/stage0/13-image/00-run.sh b/stage0/13-image/00-run.sh index 8563ae6..a9adedc 100755 --- a/stage0/13-image/00-run.sh +++ b/stage0/13-image/00-run.sh @@ -1,19 +1,19 @@ #!/bin/bash -e -unmount_image ${IMG_FILE} +unmount_image "$IMG_FILE" -rm -f ${IMG_FILE} +rm -f "$IMG_FILE" -rm -rf ${ROOTFS_DIR} -mkdir -p ${ROOTFS_DIR} +rm -rf "$ROOTFS_DIR" +mkdir -p "$ROOTFS_DIR" -BOOT_SIZE=$(du --apparent-size -s ${ROOTFS_DIR}/boot --block-size=1 | cut -f 1) -TOTAL_SIZE=$(du --apparent-size -s ${ROOTFS_DIR} --exclude var/cache/apt/archives --block-size=1 | cut -f 1) +BOOT_SIZE=$(du --apparent-size -s "$ROOTFS_DIR/boot" --block-size=1 | cut -f 1) +TOTAL_SIZE=$(du --apparent-size -s "$ROOTFS_DIR" --exclude var/cache/apt/archives --block-size=1 | cut -f 1) IMG_SIZE=$((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024))) -truncate -s ${IMG_SIZE} ${IMG_FILE} -fdisk -H 255 -S 63 ${IMG_FILE} < /dev/null mkfs.ext4 -O ^huge_file $ROOT_DEV > /dev/null -mount -v $ROOT_DEV ${ROOTFS_DIR} -t ext4 -mkdir -p ${ROOTFS_DIR}/boot -mount -v $BOOT_DEV ${ROOTFS_DIR}/boot -t vfat +mount -v $ROOT_DEV "$ROOTFS_DIR" -t ext4 +mkdir -p "$ROOTFS_DIR/boot" +mount -v $BOOT_DEV "$ROOTFS_DIR/boot" -t vfat