Move env_var_exist first usage after the function is defined
This commit is contained in:
parent
9257f1dd05
commit
9a9976bb1c
8
setup.sh
8
setup.sh
@ -57,10 +57,6 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
root=false
|
||||
fi
|
||||
|
||||
if env_var_exists RUNPOD_POD_ID || env_var_exists RUNPOD_API_KEY; then
|
||||
RUNPOD=true
|
||||
fi
|
||||
|
||||
env_var_exists() {
|
||||
local env_var=
|
||||
env_var=$(declare -p "$1")
|
||||
@ -116,6 +112,10 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
fi
|
||||
}
|
||||
|
||||
if env_var_exists RUNPOD_POD_ID || env_var_exists RUNPOD_API_KEY; then
|
||||
RUNPOD=true
|
||||
fi
|
||||
|
||||
# This is the pre-install work for a kohya installation on a runpod
|
||||
if [ "$RUNPOD" = true ]; then
|
||||
if [ -d "$VENV_DIR" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user