aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-05-16 11:39:56 +0800
committertypebrook <typebrook@gmail.com>2020-05-16 11:39:56 +0800
commit30c961b00d876e10310d95b83f891b94193c5f9d (patch)
tree16951d5a2dd6167c95edfc792a2688027dc3551c
parent2be80ffa48ec4422c108956cebec96f53e9f7986 (diff)
Simplify the way to print temp files
-rwxr-xr-xgist2
1 files changed, 1 insertions, 1 deletions
diff --git a/gist b/gist
index 7c1db22..8dc703e 100755
--- a/gist
+++ b/gist
@@ -77,7 +77,7 @@ set -o pipefail
77 77
78# clean temporary files 78# clean temporary files
79tmp_dir=$(mktemp -d) 79tmp_dir=$(mktemp -d)
80trap "[[ '$DEBUG' == 'true' ]] && find $tmp_dir -type f | xargs tail -n +1 > log; rm -r $tmp_dir" EXIT 80trap "[[ '$DEBUG' == 'true' ]] && tail -n +1 $tmp_dir/* >log 2>/dev/null; rm -r $tmp_dir" EXIT
81 81
82# Mac compatibility 82# Mac compatibility
83tmp_file() { 83tmp_file() {