From d47888a8a3ab2e52a2b40b9bb88ef88fee24cd9c Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Sat, 20 May 2023 11:25:09 +0000 Subject: [PATCH] fix: check existent of busybox if dos2unix is not installed --- src/script.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/script.sh b/src/script.sh index 466d5a27..c979fc2f 100644 --- a/src/script.sh +++ b/src/script.sh @@ -37,10 +37,16 @@ check_grep() { check_grep -## Fallback to busybox dos2unix +## Fallback to busybox's dos2unix if installed if ! command -v dos2unix &> /dev/null then - alias dos2unix="busybox dos2unix" + if command -v busybox &> /dev/null + then + alias dos2unix="busybox dos2unix" + else + echo "dos2unix or busybox not found" + exit 1 + fi fi