From 6e1d27a7138b196aaee83742352287bbf720f442 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 28 Jan 2025 16:04:15 +0100 Subject: bash: handle missign commands --- .profile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to '.profile') diff --git a/.profile b/.profile index 52b0258..cdc28e3 100644 --- a/.profile +++ b/.profile @@ -1,8 +1,11 @@ # ~/.profile -case $(uname -o) in -(Android) - PATH=~/bin:${HOME%/*}/usr/bin:~/go/bin +export OS=$(~/bin/os) + +case $OS in +(arch|alpine) + PATH=~/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:~/go/bin + export XDG_RUNTIME_DIR=/run/user/$(id -u) ;; (Darwin) PATH=~/bin:~/mu/bin:/opt/homebrew/bin:/opt/homebrew/opt/ruby/bin:/opt/homebrew/opt/tcl-tk/bin:$PATH:~/go/bin:~/.cargo/bin:~/.pyenv/versions/2.7.18/bin:~/.local/bin @@ -12,13 +15,12 @@ case $(uname -o) in eval "$(ssh-agent -s)" ssh-add fi - . "/opt/homebrew/etc/profile.d/bash_completion.sh" + . /opt/homebrew/etc/profile.d/bash_completion.sh tabs -4 export HOMEBREW_NO_ANALYTICS=1 ;; -(Linux|GNU/Linux) - PATH=~/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:~/go/bin - export XDG_RUNTIME_DIR=/run/user/$(id -u) +(termux) + PATH=~/bin:${HOME%/*}/usr/bin:~/go/bin ;; esac -- cgit v1.2.3