On Linux systems, automatically schedule the deletion of the temporary html file.
David Blume

David Blume commited on 2019-05-26 20:51:58
Showing 1 changed files, with 1 additions and 0 deletions.

... ...
@@ -82,6 +82,7 @@ md() {
82 82
         declare -r T=$(mktemp --suffix=.html)
83 83
         curl -s -X POST --data-binary @"$1" https://md.dlma.com/ > $T
84 84
         xdg-open $T
85
+        echo "rm \"$T\" >/dev/null 2>&1" | at now + 2 minutes
85 86
     fi
86 87
 }
87 88
 
88 89