dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README

profile (2133B)


      1 #!/bin/sh
      2 # ~/.profile: executed by the command interpreter for login shells.
      3 # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
      4 # exists.
      5 # see /usr/share/doc/bash/examples/startup-files for examples.
      6 # the files are located in the bash-doc package.
      7 
      8 # System-wide .profile for sh(1)
      9 if [ -x /usr/libexec/path_helper ]; then
     10   eval "$(/usr/libexec/path_helper -s)"
     11 fi
     12 
     13 if [ "${BASH-no}" != "no" ]; then
     14     [ -r /etc/bashrc ] && . /etc/bashrc
     15 fi
     16 
     17 # if running bash
     18 if [ -n "$BASH_VERSION" ]; then
     19     # include .bashrc if it exists
     20     if [ -f "$HOME/.bashrc" ]; then
     21     . "$HOME/.bashrc"
     22     fi
     23 fi
     24 
     25 # set PATH so it includes user's private bin if it exists
     26 if [ -d "$HOME/bin" ] ; then
     27     PATH="$HOME/bin:$PATH"
     28 fi
     29 
     30 if [ -d "$HOME/.local/bin" ] ; then
     31     PATH="$HOME/.local/bin:$PATH"
     32 fi
     33 if [ -d "$HOME/.scripts" ] ; then
     34     PATH="$HOME/.scripts:$PATH"
     35 fi
     36 if [ -d "$HOME/.bin" ] ; then
     37     PATH="$HOME/.bin:$PATH"
     38 fi
     39 if [ -d "$HOME/go/bin" ] ; then
     40     PATH="$HOME/go/bin:$PATH"
     41 fi
     42 if [ -d "/usr/local/opt/util-linux/bin" ] ; then
     43     PATH="/usr/local/opt/util-linux/bin:$PATH"
     44 fi
     45 if [ -f "$HOME/.secret_env_variables" ] ; then
     46   . "$HOME/.secret_env_variables"
     47 fi
     48 # Haskell
     49 if [ -d "$HOME/.config/.ghcup/bin" ]; then
     50    PATH="$HOME/.config/.ghcup/bin:$PATH"
     51 fi
     52 if [ -d "/usr/local/sbin" ]; then
     53   PATH="/usr/local/sbin:$PATH"
     54 fi
     55 if command -v rbenv 1>/dev/null 2>&1; then
     56   eval "$(rbenv init -)"
     57 fi
     58 if [ -d "/usr/local/opt/coreutils/libexec/gnubin" ]; then
     59   PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
     60 fi
     61 if [ -d "$HOME/.local/gnat/bin" ]; then
     62   PATH="$PATH:$HOME/.local/gnat/bin"
     63 fi
     64 
     65 export DOTFILES="$HOME/.dotfiles"
     66 EDITOR="$(command -v vim)"; export EDITOR
     67 export MUSIC_DIR="/Volumes/HDD/Music/iTunes/iTunes Media/Music"
     68 if command -v bat 1>/dev/null 2>&1; then
     69   export PAGER="bat"
     70 else
     71   export PAGER="less -R"
     72 fi
     73 export LANG="en_US.UTF-8"
     74 export LC_ALL="en_US.UTF-8"
     75 export LC_COLLATE="en_US.UTF-8"
     76 export LC_CTYPE="UTF-8"
     77 export LC_MESSAGES="en_US.UTF-8"
     78 export LC_MONETARY="en_US.UTF-8"
     79 export LC_NUMERIC="en_US.UTF-8"
     80 export LC_TIME="en_US.UTF-8"
     81 
     82 . "$DOTFILES/shell/use-config-dir"