1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #!/bin/bash
-
- ######################################################
- ### things to do AFTER host/user-specific settings ###
- ######################################################
-
- ### .... ###
- ### BASH ###
- ### '''' ###
-
- __make_ps1d() {
- local rvfile="/var/tmp/bash-rv/$$.lastrv"
- local lastrv
- read lastrv <<<$(cat $rvfile 2>/dev/null)
- local do_rm=false
- test "$1" == "-r" && do_rm=true
- if [ 0$lastrv -gt 0 ];
- then
- echo "!$lastrv!"
- else
- echo ""
- fi
- $do_rm && rm -f $rvfile
- }
-
- __save_rv() {
- local rvfile="/var/tmp/bash-rv/$$.lastrv"
- [ -w ${rvfile%
|