remove source checks, they don't work
This commit is contained in:
@@ -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")"
|
BOBBY_ROOT="$(dirname "$BASH_SOURCE")"
|
||||||
|
|
||||||
if [[ ! -f "${BOBBY_ROOT}/esp-idf/export.sh" ]]
|
if [[ ! -f "${BOBBY_ROOT}/esp-idf/export.sh" ]]
|
||||||
|
@@ -1,21 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
[[ $_ != $0 ]] && HAS_BEEN_SOURCED=1
|
|
||||||
|
|
||||||
VALID_CONFIGS=(feedc0de comred)
|
VALID_CONFIGS=(feedc0de comred)
|
||||||
|
|
||||||
function print_usage
|
print_usage() {
|
||||||
{
|
|
||||||
echo "usage: ./switchconf.sh ${VALID_CONFIGS[@]}"
|
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" ]]
|
if [[ -z "$1" ]]
|
||||||
then
|
then
|
||||||
echo "ERROR: no buildconfig specified"
|
echo "ERROR: no buildconfig specified"
|
||||||
|
Reference in New Issue
Block a user