12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- #!/bin/bash
-
- ######################################################
- ### things to do AFTER host/user-specific settings ###
- ######################################################
-
- ### .... ###
- ### BASH ###
- ### '''' ###
-
- __make_ps1d() {
- local rvfile="$RV_TMP/$$.lastrv"
- local lastrv="$(cat "$rvfile")"
- 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="$RV_TMP/$$.lastrv"
- [ -w "${rvfile%/*}" ] && echo "$1" > "$rvfile"
- }
-
- make_ps1() {
- # these functions must be already defined by ~/.bash/user
|