remove source checks, they don't work

This commit is contained in:
Michael Ehrenreich
2021-08-25 05:59:32 +02:00
parent d350eddad8
commit 78292a1518
2 changed files with 1 additions and 17 deletions

View File

@ -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" ]]

View File

@ -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"