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