From: Brian West Date: Mon, 5 Jan 2015 19:09:25 +0000 (-0600) Subject: Auto update .bashrc if hostname contains freeswitch.org X-Git-Tag: v1.4.16~1^2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79df8bafa66e47bed24bfd062e86d5c5a51b60f7;p=thirdparty%2Ffreeswitch.git Auto update .bashrc if hostname contains freeswitch.org --- diff --git a/support-d/.bashrc b/support-d/.bashrc index 595c6fccb0..05b3b38149 100644 --- a/support-d/.bashrc +++ b/support-d/.bashrc @@ -1,5 +1,5 @@ # -# /etc/profile: system-wide defaults for bash(1) login shells +# FreeSWITCH Dev .bashrc # export UNAME=`uname -s` @@ -60,7 +60,6 @@ alias mecas='emacs' alias bgit='git commit --author "Brian West "' alias mgit='git commit --author "Mike Jerris "' alias tgit='git commit --author "Anthony Minessale "' -alias igit='git commit --author "Raymond Chandler "' alias dp='emacs /usr/local/freeswitch/conf/dialplan/default.xml' alias go='/usr/local/freeswitch/bin/freeswitch -nonat' alias fstop='top -p `cat /usr/local/freeswitch/run/freeswitch.pid`' @@ -69,4 +68,18 @@ alias fscore='gdb /usr/local/freeswitch/bin/freeswitch `ls -rt core.* | tail -n1 alias emacs='emacs -nw' 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' alias jitteroff='tc qdisc del dev eth0 root netem' + +# Auto Update the .bashrc if hostname contains freeswitch.org +if [[ $(hostname) =~ "freeswitch.org" ]]; then + if [ -f /usr/src/freeswitch.git/support-d/.bashrc ]; then + /usr/bin/diff --brief <(sort /usr/src/freeswitch.git/support-d/.bashrc) <(sort ~/.bashrc) >/dev/null + if [ $? -eq 1 ]; then + /bin/cp -f /usr/src/freeswitch.git/support-d/.bashrc ~/ + echo ".bashrc updated." + source ~/.bashrc + fi + fi +fi +# End Auto Update + # End of file