function addpath() {
    if  [[ ":$PATH:" != *":$1:"* ]]; then
        PATH="${PATH:+"$PATH:"}$1"
        export PATH
    fi
}