Skip to content

Commit 06c7c4c

Browse files
committed
Diminish the notion of prelude #84 : get rid of tmp files
1 parent 78ed6ac commit 06c7c4c

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

Makesurefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
function run_tush_file() {
6363
local f="$1"
6464

65-
before_count=$(calc_temp_files)
65+
# before_count=$(calc_temp_files)
6666

6767
export PATH="$PATH:$MYDIR/soft/tush/bin"
6868
export NEXT_VERSION
@@ -74,12 +74,12 @@
7474
echo >&2 "!!! TESTS FAILED !!! : $f"
7575
exit 1
7676
fi
77-
after_count=$(calc_temp_files)
78-
if (( before_count != after_count ))
79-
then
80-
echo >&2 "!!! temp file not deleted !!!"
81-
exit 1
82-
fi
77+
# after_count=$(calc_temp_files)
78+
# if (( before_count != after_count ))
79+
# then
80+
# echo >&2 "!!! temp file not deleted !!!"
81+
# exit 1
82+
# fi
8383
}
8484
function calc_temp_files {
8585
local tmp_count=$(find /tmp -maxdepth 1 -type f -name 'makesure.*' | wc -l)

makesure.awk

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ BEGIN {
55
SupportedOptions["tracing"]
66
SupportedOptions["silent"]
77
SupportedOptions["timing"]
8-
Tmp = isDir("/dev/shm") ? "/dev/shm" : "/tmp"
98
split("",Lines)
109
split("",Args) # parsed CLI args
1110
split("",ArgGoals) # invoked goals
@@ -762,7 +761,6 @@ function arrLast(arr) { return arr[arrLen(arr)-1] }
762761
function commandExists(cmd) { return ok("command -v " cmd " >/dev/null") }
763762
function ok(cmd) { return system(cmd) == 0 }
764763
function isFile(path) { return ok("test -f " quoteArg(path)) }
765-
function isDir(path) { return ok("test -d " quoteArg(path)) }
766764
function rm(f) { system("rm " quoteArg(f)) }
767765
function quoteArg(a) { gsub("'", "'\\''", a); return "'" a "'" }
768766
function trim(s) { sub(/^[ \t\r\n]+/, "", s); sub(/[ \t\r\n]+$/, "", s); return s }

0 commit comments

Comments
 (0)