#!/bin/sh # 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 /command /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