Add spacing
This commit is contained in:
parent
fc9879c6ff
commit
930d9da516
@ -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"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user