Hook in "/MOCK".
authorjkratoch <>
Sun, 7 Jun 2009 07:57:19 +0000 (07:57 +0000)
committerjkratoch <>
Sun, 7 Jun 2009 07:57:19 +0000 (07:57 +0000)
.bashrc

diff --git a/.bashrc b/.bashrc
index 1221921..2cec0f7 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -178,12 +178,16 @@ if echo x|GREP_OPTIONS="--exclude=y" grep -q x 2>/dev/null;then
        #export GREP_OPTIONS="$GREP_OPTIONS --exclude=testsuite --exclude=.pc --exclude=.svn"
 fi
 if [ -n "$PS1" ];then  # set only in interactive sessions
-       export PS1='[bash]${LOGNAME}@${HOSTNAME}:${PWD}# '
+       if [ ! -f /MOCK ];then
+               export PS1='[bash]${LOGNAME}@${HOSTNAME}:${PWD}# '
+       else
+               export PS1='[bash]${LOGNAME}@MOCK-'"`cat /MOCK`"':${PWD}# '
+       fi
        export PS1='\[\017\]'"$PS1"     # \017=std charmap
        export PS1='\[\033%G\]'"$PS1"   # \033%G=utf-8
        # Do not: kbd_mode -u # utf-8
        # as it breaks keyboard state in X and it is not permitted for non-root.
-       fi
+fi
 export MINICOM="-m -c on"      # metakeys+color
 export HISTSIZE=100000
 export HISTFILESIZE="$HISTSIZE"