Skip to content

Commit

Permalink
Use FIM_HOME as HOME override
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanformigoni committed Feb 17, 2024
1 parent b2f4f00 commit d7fb635
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/scripts/_boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1359,12 +1359,17 @@ function _main()
# Check if config exists, else try to touch if mounted as RW
[ -f "$FIM_FILE_CONFIG" ] || { [ -n "$FIM_RO" ] || touch "$FIM_FILE_CONFIG"; }

# Check if custom home directory is set
local home="$(_config_fetch --value --single "home")"
# # Expand
home="$(eval echo "$home")"
# # Set & show on debug mode
[[ -z "$home" ]] || { mkdir -p "$home" && export HOME="$home"; }
# Only set HOME by config if environment variable is unset
if [[ -v FIM_HOME ]]; then
HOME="$(eval echo "$FIM_HOME")"
else
# Get custom home
local home="$(_config_fetch --value --single "home")"
# Expand
home="$(eval echo "$home")"
# Set
[[ -z "$home" ]] || { mkdir -p "$home" && export HOME="$home"; }
fi
_msg "FIM_HOME : $HOME"

# Check if custom package name is set
Expand Down

0 comments on commit d7fb635

Please sign in to comment.