diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-08-20 08:10:39 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-08-20 08:10:39 +0200 |
| commit | c1b5efa4349bdf7b8b57663b260678dfadac62e8 (patch) | |
| tree | a47393481d43d212a05f663ead89da230d14b113 /zsh | |
| parent | df20a3d5ad601cb795498182510e3056e4a261a1 (diff) | |
| download | dotfiles-c1b5efa4349bdf7b8b57663b260678dfadac62e8.tar.gz dotfiles-c1b5efa4349bdf7b8b57663b260678dfadac62e8.tar.bz2 dotfiles-c1b5efa4349bdf7b8b57663b260678dfadac62e8.zip | |
zsh: zprofile modularer gestaltet
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/zprofile | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/zsh/zprofile b/zsh/zprofile index 7fed3a7..62604c8 100644 --- a/zsh/zprofile +++ b/zsh/zprofile | |||
| @@ -11,34 +11,45 @@ add_path() { | |||
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | set_include_lib_path() { | 13 | set_include_lib_path() { |
| 14 | local prefix="$1" | ||
| 15 | |||
| 14 | # Fix für include/lib Verzeichnisse | 16 | # Fix für include/lib Verzeichnisse |
| 15 | # Details: https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html | 17 | # Details: https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html |
| 16 | export C_INCLUDE_PATH="$1/include:$C_INCLUDE_PATH" | 18 | |
| 17 | export CPLUS_INCLUDE_PATH="$1/include:$CPLUS_INCLUDE_PATH" | 19 | export C_INCLUDE_PATH="$prefix/include${C_INCLUDE_PATH:+:$C_INCLUDE_PATH}" |
| 18 | export LIBRARY_PATH="$1/lib:$LIBRARY_PATH" | 20 | export CPLUS_INCLUDE_PATH="$prefix/include${CPLUS_INCLUDE_PATH:+:$CPLUS_INCLUDE_PATH}" |
| 21 | export LIBRARY_PATH="$prefix/lib${LIBRARY_PATH:+:$LIBRARY_PATH}" | ||
| 19 | } | 22 | } |
| 20 | 23 | ||
| 21 | add_path "$HOME/.cargo/bin" | 24 | set_mac_environment() { |
| 22 | add_path "$HOME/.local/bin" | 25 | add_path "/opt/homebrew/bin" |
| 26 | set_include_lib_path "/opt/homebrew" | ||
| 27 | } | ||
| 23 | 28 | ||
| 24 | case "$OSTYPE" in | 29 | set_freebsd_environment() { |
| 25 | darwin*) | 30 | local texlive_prefix="$HOME/.local/texlive" |
| 26 | add_path "/opt/homebrew/bin" | 31 | |
| 32 | if [[ -d "$texlive_prefix/bin/amd64-freebsd" ]]; then | ||
| 33 | add_path "$texlive_prefix/bin/amd64-freebsd" | ||
| 34 | |||
| 35 | export MANPATH="${MANPATH:-$(manpath)}:$texlive_prefix/texmf-dist/man" | ||
| 36 | export INFOPATH="${INFOPATH:+$INFOPATH:}$texlive_prefix/texmf-dist/info" | ||
| 37 | fi | ||
| 27 | 38 | ||
| 28 | set_include_lib_path "/opt/homebrew" | 39 | set_include_lib_path "/usr/local" |
| 29 | ;; | ||
| 30 | freebsd*) | ||
| 31 | texlive_prefix="$HOME/.local/texlive" | ||
| 32 | 40 | ||
| 33 | if [[ -d "$texlive_prefix/bin/amd64-freebsd" ]]; then | 41 | # mpd starten |
| 34 | add_path "$texlive_prefix/bin/amd64-freebsd" | 42 | if [[ -x /usr/local/bin/musicpd ]] && ! pgrep "musicpd" > /dev/null; then |
| 43 | /usr/local/bin/musicpd | ||
| 44 | fi | ||
| 45 | } | ||
| 35 | 46 | ||
| 36 | export MANPATH="${MANPATH:-$(manpath)}:$texlive_prefix/texmf-dist/man" | 47 | add_path "$HOME/.cargo/bin" |
| 37 | export INFOPATH="${INFOPATH:+$INFOPATH:}$texlive_prefix/texmf-dist/info" | 48 | add_path "$HOME/.local/bin" |
| 38 | fi | ||
| 39 | 49 | ||
| 40 | set_include_lib_path "/usr/local" | 50 | case "$OSTYPE" in |
| 41 | ;; | 51 | darwin*) set_mac_environment ;; |
| 52 | freebsd*) set_freebsd_environment ;; | ||
| 42 | esac | 53 | esac |
| 43 | 54 | ||
| 44 | # Fix Midnight Commander ESC Taste | 55 | # Fix Midnight Commander ESC Taste |
| @@ -56,10 +67,7 @@ export VIT_DIR="$XDG_CONFIG_HOME/vit" | |||
| 56 | # Maildir für mu (mail-utils) | 67 | # Maildir für mu (mail-utils) |
| 57 | export MAILDIR="$HOME/Mail" | 68 | export MAILDIR="$HOME/Mail" |
| 58 | 69 | ||
| 59 | # mpd starten | ||
| 60 | if [[ -x /usr/local/bin/musicpd ]] && ! pgrep "musicpd" > /dev/null; then | ||
| 61 | /usr/local/bin/musicpd | ||
| 62 | fi | ||
| 63 | |||
| 64 | unfunction add_path | 70 | unfunction add_path |
| 65 | unfunction set_include_lib_path | 71 | unfunction set_include_lib_path |
| 72 | unfunction set_mac_environment | ||
| 73 | unfunction set_freebsd_environment | ||
