]> git.donarmstrong.com Git - home-base.git/blobdiff - .bashrc
only run devtodo when it exists
[home-base.git] / .bashrc
diff --git a/.bashrc b/.bashrc
index 6ff2b358b468536205e5313123eef5768c5bcc12..5f3c7da67c5be696fc47a675dc6d09088f57e310 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -48,35 +48,41 @@ if [ "$PS1" ]; then
     fi;
     
     alias aumix2='aumix -d /dev/mixer1 -I'
-    export LANG="en_US.UTF-8"
+    if locale -a |grep -qi en_US.utf8; then
+       LANG="en_US.UTF-8"
+    else
+       LANG=C
+    fi;
+    export LANG
     export PATH="~/bin:$PATH"
     if [ ! -e ~/tmp ]; then
        mkdir ~/tmp;
     fi;
     export TMPDIR="$(echo ~/tmp)";
 
-    for a in tda tdd tde; do
-       alias "s${a}"="STODO_NO_COMMIT=1 $a"
-    done;
+    if [ -n "$(which devtodo)" ]; then
+       for a in tda tdd tde; do
+           alias "s${a}"="STODO_NO_COMMIT=1 $a"
+       done;
 
-    TODO_OPTIONS="--timeout --summary"
+       TODO_OPTIONS="--timeout --summary"
 
-    cd ()
-    {
-        builtin cd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
-    }
-
-    pushd ()
-    {
-        builtin pushd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
-    }
-    
-    popd ()
-    {
-        builtin popd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
-    }              
-    
-    # Run todo initially upon login
-    devtodo ${TODO_OPTIONS}
+       cd ()
+       {
+            builtin cd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
+       }
 
+       pushd ()
+       {
+            builtin pushd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
+       }
+       
+       popd ()
+       {
+            builtin popd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
+       }              
+       
+        # Run todo initially upon login
+       devtodo ${TODO_OPTIONS}
+    fi;
 fi