#!/bin/bash
# /etc/skel/.bash_profile

# This file is sourced by bash for login shells. The following line
# runs your .bashrc and is recommended by the bash info pages.
#[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -f /etc/bash_completion ] ; then
    source /etc/bash_completion
#echo 'source /etc/bash_completion'
fi

#   export LC_CTYPE="zh_CN.UTF-8"
#   export LANG="zh_CN.UTF-8"
#   export LANGUAGE="zh_CN:zh:en_US:en"
#
#   export XMODIFIERS="@im=SCIM"
#   export GTK_IM_MODULE="scim"
#   export QT_IM_MODULE="scim"
#   export XIM=SCIM
#   export XIM_PROGRAM=/usr/bin/scim
#   export XIM_ARGS="-d"
alias mv='mv -i'
alias rm='rm -i'
alias cp='cp -i'
alias ls='ls --color=auto'
alias ll='ls --color=auto -l'
export PS1='[\u@\h \W] \$ '
echo 'running bashrc'

setterm -blength 0 #text mode terminal bell off
echo "setterm -blength 0"

export MPD_HOST="127.0.0.1"
export MPD_PORT=6600

#export SYSROOT="/usr/cross/arm/sysroot"
export SYSROOT="/usr/cross/mips/sysroot"

#export LD_LIBRARY_PATH=$SYSROOT/usr/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$SYSROOT/usr/lib

# In addition to the shell function mentioned above you might wish to add
#other commands to your function. One example is to echo the directory
#you changed to:

function cv () {
    cdargs "$1" && cd "`cat "$HOME/.cdargsresult"`" && pwd;
}

#Or you can remove the file in which cdargs reports it's result:

function cvr () {
    cdargs "$1" && cd "`cat "$HOME/.cdargsresult"`" && rm -f "$HOME/.cdargsresult";
}


pathmunge () {
    if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
        if [ "$2" = "after" ] ; then
            PATH=$PATH:$1
        else
            PATH=$1:$PATH
        fi
    fi
}