Only export XDG_CONFIG_HOME and XDG_DATA_HOME if they aren't already set

This commit is contained in:
Ken VanDine
2025-01-22 07:38:41 +02:00
committed by Mitchell Hashimoto
parent 5841a4f958
commit 7e5c57a848

View File

@ -1,8 +1,15 @@
#!/bin/sh
set -e
# Set these to reasonable defaults if not already set
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME="$SNAP_REAL_HOME/.config"
fi
if [ -z "$XDG_DATA_HOME" ]; then
export XDG_DATA_HOME="$SNAP_REAL_HOME/.local/share"
fi
export HOME="$SNAP_REAL_HOME"
if [ "$SNAP_ARCH" = "amd64" ]; then