From c8b6a1c2281262dd843103dd98be5c7ccc838d3e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 9 Feb 2023 19:51:00 -0500 Subject: [PATCH] fix installation issue for Mint Linux (#881) Signed-off-by: Tiger Wang --- build/scripts/setup/script.d/03-setup-casaos.sh | 4 +++- .../usr/share/casaos/cleanup/script.d/03-cleanup-casaos.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build/scripts/setup/script.d/03-setup-casaos.sh b/build/scripts/setup/script.d/03-setup-casaos.sh index 2a96d356d..f270cce1f 100755 --- a/build/scripts/setup/script.d/03-setup-casaos.sh +++ b/build/scripts/setup/script.d/03-setup-casaos.sh @@ -18,7 +18,9 @@ __get_setup_script_directory_by_os_release() { } || { pushd "${ID}" >/dev/null } || { - pushd "${ID_LIKE}" >/dev/null + [[ -n ${ID_LIKE} ]] && for ID in ${ID_LIKE}; do + pushd "${ID}" >/dev/null && break + done } || { echo "Unsupported OS: ${ID} ${VERSION_CODENAME} (${ID_LIKE})" exit 1 diff --git a/build/sysroot/usr/share/casaos/cleanup/script.d/03-cleanup-casaos.sh b/build/sysroot/usr/share/casaos/cleanup/script.d/03-cleanup-casaos.sh index 8b066b33e..6d4cb5c64 100644 --- a/build/sysroot/usr/share/casaos/cleanup/script.d/03-cleanup-casaos.sh +++ b/build/sysroot/usr/share/casaos/cleanup/script.d/03-cleanup-casaos.sh @@ -26,7 +26,9 @@ __get_setup_script_directory_by_os_release() { } || { pushd "${ID}" &>/dev/null } || { - pushd "${ID_LIKE}" &>/dev/null + [[ -n ${ID_LIKE} ]] && for ID in ${ID_LIKE}; do + pushd "${ID}" >/dev/null && break + done } || { echo "Unsupported OS: ${ID} ${VERSION_CODENAME} (${ID_LIKE})" exit 1