.bashrc 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #
  2. # FreeSWITCH Dev .bashrc
  3. #
  4. export UNAME=`uname -s`
  5. if [ "`id -u`" = "0" ]; then
  6. if [ "${UNAME}" = "Linux" ]; then
  7. export PATH="$PATH:/opt/bin:/usr/local/bin:/usr/local/sbin:/usr/local/freeswitch/bin"
  8. export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig
  9. fi
  10. if [ "${UNAME}" = "SunOS" ]; then
  11. export PATH="$PATH:/opt/64/bin:/opt/bin:/usr/local/bin:/usr/local/sbin:/usr/local/freeswitch/bin"
  12. export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/64/lib/pkgconfig:/usr/lib/amd64/pkgconfig:/opt/lib/pkgconfig:/usr/lib/pkgconfig
  13. fi
  14. if [ "${UNAME}" = "OpenBSD" ]; then
  15. export PATH="$PATH:/usr/local/freeswitch/bin"
  16. export AUTOCONF_VERSION=2.69
  17. export AUTOMAKE_VERSION=1.13
  18. export LIBTOOL=/usr/local/bin/libtoolize
  19. export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
  20. export PKG_PATH=http://openbsd.mirrors.pair.com/`uname -r`/packages/`machine -a`/
  21. fi
  22. if [ "${UNAME}" = "NetBSD" ]; then
  23. export PATH="$PATH:/usr/local/freeswitch/bin"
  24. export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/pkg/lib/pkgconfig
  25. export PKG_PATH=http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All/
  26. fi
  27. if [ "${UNAME}" = "FreeBSD" ]; then
  28. export PATH="$PATH:/usr/local/freeswitch/bin"
  29. export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/pkg/lib/pkgconfig
  30. fi
  31. if [ "${UNAME}" = "DragonFly" ]; then
  32. export PATH="$PATH:/usr/local/freeswitch/bin"
  33. export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/pkg/lib/pkgconfig
  34. fi
  35. fi
  36. if [ "${UNAME}" = "Darwin" ]; then
  37. if [ -d ~/src/depot_tools ]; then
  38. export PATH=$PATH:~/src/depot_tools
  39. fi
  40. if [ -d "/Applications/Chromium.app" ]; then
  41. alias chromium='CHROME_LOG_FILE=chrome.log /Applications/Chromium.app/Contents/MacOS/Chromium --args --enable-usermedia-screen-capturing --usermedia-screen-capturing --enable-logging --v=1 --vmodule=*source*/talk/*=5 2>&1 | tee console.log'
  42. fi
  43. if [ -d "/Applications/Google Chrome Canary.app" ]; then
  44. alias canary='CHROME_LOG_FILE=chrome.log /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --args --enable-usermedia-screen-capturing --usermedia-screen-capturing --enable-logging --v=1 --vmodule=*source*/talk/*=5 2>&1 | tee console.log'
  45. fi
  46. if [ -d "/Applications/Google Chrome.app" ]; then
  47. alias chrome='CHROME_LOG_FILE=chrome.log /Applications/Google\ Chrome.app/Concd outtents/MacOS/Google\ Chrome --args --enable-usermedia-screen-capturing --usermedia-screen-capturing --enable-logging --v=1 --vmodule=*source*/talk/*=5 2>&1 | tee console.log'
  48. fi
  49. fi
  50. if [ ! -f ~/.inputrc ]; then
  51. export INPUTRC="/etc/inputrc"
  52. fi
  53. set -o emacs
  54. export PROMPT_COMMAND="history -a; history -c; history -r; ${PROMPT_COMMAND}"
  55. export HISTSIZE=5000
  56. export TERM=xterm-256color
  57. export LESSCHARSET="latin1"
  58. export LESS="-R"
  59. export CHARSET="ISO-8859-1"
  60. export PS1='\n\[\033[01;31m\]\u@\h\[\033[01;36m\] [\d \@] \[\033[01;33m\] \w\n\[\033[00m\]<\#>:'
  61. export PS2="\[\033[1m\]> \[\033[0m\]"
  62. if [ -f ~/.viplease ]; then
  63. if [ -f /usr/bin/vim ]; then
  64. export VISUAL=vim
  65. else
  66. export VISUAL=vi
  67. fi
  68. else
  69. export VISUAL=emacs
  70. fi
  71. export GIT_SSL_NO_VERIFY=true
  72. umask 022
  73. alias e='emacs'
  74. alias eamcs='emacs'
  75. alias emcas='emacs'
  76. alias meacs='emacs'
  77. alias mecas='emacs'
  78. alias bgit='git commit --author "Brian West <brian@freeswitch.org>"'
  79. alias mgit='git commit --author "Mike Jerris <mike@jerris.com>"'
  80. alias tgit='git commit --author "Anthony Minessale <anthm@freeswitch.org>"'
  81. alias dp='emacs /usr/local/freeswitch/conf/dialplan/default.xml'
  82. alias go='/usr/local/freeswitch/bin/freeswitch -nonat'
  83. alias fstop='top -p `cat /usr/local/freeswitch/run/freeswitch.pid`'
  84. alias fsgcore='gcore `cat /usr/local/freeswitch/run/freeswitch.pid`'
  85. alias fsgdb='gdb /usr/local/freeswitch/bin/freeswitch `cat /usr/local/freeswitch/run/freeswitch.pid`'
  86. alias fscore='gdb /usr/local/freeswitch/bin/freeswitch `ls -rt core.* | tail -n1`'
  87. alias emacs='emacs -nw'
  88. if [ "${UNAME}" = "Linux" ]; then
  89. alias govg='valgrind --tool=memcheck --log-file=vg.log --leak-check=full --leak-resolution=high --show-reachable=yes .libs/freeswitch -vg'
  90. alias jitteron='tc qdisc add dev eth0 root handle 1: netem delay 40ms 20ms ; tc qdisc add dev eth0 parent 1:1 pfifo limit 1000'
  91. alias jitteroff='tc qdisc del dev eth0 root netem'
  92. fi
  93. # Auto Update the .bashrc if hostname contains freeswitch.org
  94. if [[ $(hostname) =~ "freeswitch.org" ]]; then
  95. if [ -f /usr/src/freeswitch.git/support-d/.bashrc ]; then
  96. /usr/bin/diff --brief <(sort /usr/src/freeswitch.git/support-d/.bashrc) <(sort ~/.bashrc) >/dev/null
  97. if [ $? -eq 1 ]; then
  98. /bin/cp -f /usr/src/freeswitch.git/support-d/.bashrc ~/
  99. echo ".bashrc updated."
  100. source ~/.bashrc
  101. fi
  102. fi
  103. fi
  104. # End Auto Update
  105. # End of file