1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 07:18:06 +02:00
This commit is contained in:
Kevin M 2025-04-13 11:13:51 +08:00 committed by GitHub
commit 3fa9ec78c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -216,12 +216,16 @@ function check_sharelatex_env_vars() {
function read_variable() {
local name=$1
grep -E "^$name=" "$TOOLKIT_ROOT/config/variables.env" \
| sed -r "s/^$name=([\"']?)(.+)\1\$/\2/"
(
source "$TOOLKIT_ROOT/config/variables.env"
echo "${!name:-}"
)
}
function read_configuration() {
local name=$1
grep -E "^$name=" "$TOOLKIT_ROOT/config/overleaf.rc" \
| sed -r "s/^$name=([\"']?)(.+)\1\$/\2/"
(
source "$TOOLKIT_ROOT/config/overleaf.rc"
echo "${!name:-}"
)
}