summaryrefslogtreecommitdiffstats
path: root/.profile
blob: 649ed3362385f0f4fe46cd33ff1b6feb3ebfe01d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login exists.

function make_pth() {
    local p
    local pth=""
    for p in /opt/android-sdk/platform-tools; do
        if [[ -d "${p}" ]] && echo "${PATH}" | grep -qvF "${p}"; then
            pth="${p}:${pth:-}"
        fi
    done
    for p in .local/bin .cabal/bin bin Android/Sdk/platform-tools wsp/go/binaries; do
        p="${HOME}/${p}"
        if [[ -d "${p}" ]] && echo "${PATH}" | grep -qvF "${p}"; then
            pth="${p}:${pth:-}"
        fi
    done
    printf '%s%s\n' "${pth:-}" "${PATH}"
}

export PATH="$(make_pth)"

export GTK2_RC_FILES="${HOME}/.config/gtk-2.0/gtkrc"

_PROFILE_SOURCED=1

# if running bash
if [ -n "${BASH_VERSION}" ]; then
    # include .bashrc if it exists
    if [ -f "${HOME}/.bashrc" ] && [ "${_BASHRC_SOURCED:-0}" == 0 ]; then
        source "${HOME}/.bashrc"
    fi
fi