From 296797f53af8c3caf0bb1835306f942f035c55bf Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sun, 18 Apr 2021 12:41:38 +0000 Subject: [PATCH] Typo and shellchecked --- opencore-image-ng-linux.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/opencore-image-ng-linux.sh b/opencore-image-ng-linux.sh index d1cf18b..f5a7f0c 100755 --- a/opencore-image-ng-linux.sh +++ b/opencore-image-ng-linux.sh @@ -94,11 +94,8 @@ fish() { } fish_init() { - local format + # local format - FILETYPE="$(file "${IMAGE}")" - - # case "${IMAGE##*.}" in case "$(file --brief "${IMAGE}")" in QEMU\ QCOW2\ Image* ) export FORMAT=qcow2 ;; @@ -147,10 +144,10 @@ cp -a "${BASE}/EFI" "${WORK}" export LIBGUESTFS_BACKEND=direct unset GUESTFISH_PID -source <(guestfish --listen) +source <(guestfish --listen || exit 1) -if [[ -z "$GUESTFISH_PID" ]]; - echo "ERROR: starting guestfish failed" +if [[ -z "${GUESTFISH_PID}" ]]; then + echo "ERROR: starting guestfish failed. Install libguestfs-tools" exit 1 fi