generated from coop-cloud/example
Add spacing
This commit is contained in:
@ -11,12 +11,15 @@ file_env() {
|
|||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local val="$def"
|
local val="$def"
|
||||||
|
|
||||||
if [ "${!var:-}" ]; then
|
if [ "${!var:-}" ]; then
|
||||||
val="${!var}"
|
val="${!var}"
|
||||||
elif [ "${!fileVar:-}" ]; then
|
elif [ "${!fileVar:-}" ]; then
|
||||||
val="$(< "${!fileVar}")"
|
val="$(< "${!fileVar}")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export "$var"="$val"
|
export "$var"="$val"
|
||||||
unset "$fileVar"
|
unset "$fileVar"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user