From 86be462cbe5e4cca8da07d43392255bed0aadc14 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 25 Nov 2024 18:48:22 +0100 Subject: [PATCH] =?UTF-8?q?=E2=88=92file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/main.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 83f0705..4925099 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -90,16 +90,6 @@ main_source_directory() { _sh_ifs_pop } -main_source_file() { - local path="${1}" - if [ -f "${path}" ]; then - main_source_directory "$(dirname "${path}")" - else - _sh_main_log "Not a file: ${path}" - return 1 - fi -} - # public sh_help() { @@ -110,10 +100,10 @@ sh_help() { } sh_main() { - main_source_file "${ENV}" + main_source_directory "${SH_ROOT}" main_source_directory "${SH_USER}" sh_log - sh_shellcheck "$(dirname "${ENV}")" + sh_shellcheck "${SH_ROOT}" sh_log sh_help }