+# Export PROFILE_HOME to the environment if we need to preserve it.
+if [ -n "$PROFILE_HOME" ]; then
+ [ "$PROFILE_HOME" = "$HOME" ] || export PROFILE_HOME
+fi
+
# Find a path, preferring the target user's version.
function find_target_profile() {
local path="$1"; shift