Correct order of operations for options loading, move developer / build variables there.

This commit is contained in:
fewtarius 2023-06-22 11:17:57 +00:00
parent f1266efbd1
commit 4096838466
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
3 changed files with 8 additions and 8 deletions

View file

@ -173,7 +173,7 @@ JELOS supports various build variables which alter the behavior of the distribut
> Note: <sup>1</sup> this property will change to yes/no for consistency in a future release.
### Special env variables
For development build, you can use the following env variables to customize the image or change build time functionality. They can be included in your `.bashrc` startup shell script.
For development builds, you can use the following env variables to customize the image or change build time functionality. To make them globally available to the builds, add them to ${HOME}/.JELOS/options.
|Variable|Function|
|----|----|
|LOCAL_SSH_KEYS_FILE|Enables using ssh public keys for access without the root password.|

View file

@ -105,14 +105,14 @@ CCACHE_CACHE_SIZE="20G"
# suitable zstd level, currently 1.
CCACHE_COMPRESSLEVEL="0"
# read local persistent options from ${ROOT} if available
if [ -f "${ROOT}/.jelos/options" ]; then
. "${ROOT}/.jelos/options"
# read global persistent options from $HOME if available
if [ -f "${HOME}/.${DISTRO}/options" ]; then
. "${HOME}/.${DISTRO}/options"
fi
# read global persistent options from $HOME if available
if [ -f "${HOME}/.jelos/options" ]; then
. "${HOME}/.jelos/options"
# read local persistent options from ${ROOT} if available
if [ -f "${ROOT}/.${DISTRO}/options" ]; then
. "${ROOT}/.${DISTRO}/options"
fi
# read global persistent options from ${DOCKER_WORK_DIR} if available

View file

@ -143,6 +143,6 @@ post_install() {
# WARN: Deprecated
if [ -f ~/developer_settings.conf ]; then
echo "WARNING: developer_settings.conf is deprecated, please migrate variables to the shell profile."
echo "WARNING: developer_settings.conf is deprecated, please migrate variables to \${HOME}/.${DISTRO}/options."
fi
}