From 78292a15183ed25197782a426968529fadb532e8 Mon Sep 17 00:00:00 2001 From: Michael Ehrenreich Date: Wed, 25 Aug 2021 05:59:32 +0200 Subject: [PATCH] remove source checks, they don't work --- export.sh | 7 ------- switchconf.sh | 11 +---------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/export.sh b/export.sh index f027abd..89ded47 100644 --- a/export.sh +++ b/export.sh @@ -1,10 +1,3 @@ -if [[ $_ == $0 ]] && [[ "$1" != "--skip-source-check" ]] -then - echo "export.sh has to be sourced, not run in a subshell" - echo ". export.sh" - exit 1 -fi - BOBBY_ROOT="$(dirname "$BASH_SOURCE")" if [[ ! -f "${BOBBY_ROOT}/esp-idf/export.sh" ]] diff --git a/switchconf.sh b/switchconf.sh index 42cd3a2..36393cd 100755 --- a/switchconf.sh +++ b/switchconf.sh @@ -1,21 +1,12 @@ #!/bin/bash -[[ $_ != $0 ]] && HAS_BEEN_SOURCED=1 VALID_CONFIGS=(feedc0de comred) -function print_usage -{ +print_usage() { echo "usage: ./switchconf.sh ${VALID_CONFIGS[@]}" } -if [[ ! -z "${HAS_BEEN_SOURCED}" ]] -then - echo "switch.sh cannot be sourced, run in a subshell" - print_usage - return -fi - if [[ -z "$1" ]] then echo "ERROR: no buildconfig specified"