blob: 41e68176bc3ebe9d271564a42012c10413194321 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# Add PATH entries if they aren't already in PATH
# We can't use external commands yet in case PATH is empty
for p in /bin /sbin /usr/bin /usr/sbin /var/lib/flatpak/exports/bin /usr/local/bin /usr/local/sbin ~/.local/bin ~/.cargo/bin ~/bin; do
case ":$PATH:" in
*:"$p":*) ;;
*) export PATH="$p:$PATH" ;;
esac
done
# Create a tmpdir for XDG_RUNTIME_DIR if it is not set
if [ -z "$XDG_RUNTIME_DIR" ]; then
rundir="/run/user/$(id -u)"
if [ -d "$rundir" ]; then
export XDG_RUNTIME_DIR="$rundir"
else
export XDG_RUNTIME_DIR="$(mktemp -d)"
fi
fi
export ENV=~/.ashrc
. $ENV
|