Browse Source

Clean up return value file

Alois Mahdal 10 years ago
parent
commit
b2850b307b
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      dotfiles/bash/post.bashrc

+ 3
- 1
dotfiles/bash/post.bashrc View File

9
 ### '''' ###
9
 ### '''' ###
10
 
10
 
11
 __make_ps1d() {
11
 __make_ps1d() {
12
-    lastrv=$(cat /var/tmp/bash-rv/$$.lastrv)
12
+    rvfile="/var/tmp/bash-rv/$$.lastrv"
13
+    lastrv=$(cat $rvfile)
13
     if [ $lastrv -gt 0 ];
14
     if [ $lastrv -gt 0 ];
14
     then
15
     then
15
         echo "$lastrv"
16
         echo "$lastrv"
16
     else
17
     else
17
         echo ""
18
         echo ""
18
     fi
19
     fi
20
+    rm $rvfile
19
 }
21
 }
20
 
22
 
21
 __save_rv() {
23
 __save_rv() {