Files
GarandPLG dc44eb6d62 Add free-ports script, Docker aliases, and Bun env
Add free-ports.sh script and a corresponding alias in .bash_aliases.
Introduce docker-clean and docker-update aliases for Docker maintenance.

Export BUN_INSTALL and prepend its bin directory to PATH in .profile.
2026-06-11 15:22:01 +02:00

47 lines
1.1 KiB
Bash

# ~/.profile: executed by the command interpreter for login shells.
# Function to safely add directories to PATH
add_to_path() {
case ":$PATH:" in
*":$1:"*) ;;
*) PATH="$1:$PATH" ;;
esac
}
# Add user directories to PATH
[ -d "$HOME/.local/bin" ] && add_to_path "$HOME/.local/bin"
# Cargo (Rust)
if [ -f "$HOME/.cargo/env" ]; then
. "$HOME/.cargo/env"
add_to_path "$HOME/.cargo/bin"
fi
# Bun
if [ -d "$HOME/.bun" ]; then
export BUN_INSTALL="$HOME/.bun"
add_to_path "$BUN_INSTALL/bin"
fi
# Custom local environment
[ -f "$HOME/.local/bin/env" ] && . "$HOME/.local/bin/env"
# Rust library path
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib"
# Wayland configuration
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
systemctl --user import-environment DISPLAY WAYLAND_DISPLAY
fi
# Load bashrc for bash shells
if [ -n "$BASH_VERSION" ] && [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
export PATH