From 2ac3f1e45a8b15746c6d667e81a89ad5d6b8e738 Mon Sep 17 00:00:00 2001 From: xonix Date: Mon, 27 Sep 2021 02:53:54 +0300 Subject: [PATCH] Use gawk's `gettimeofday` if available #57 : fix for mawk --- Makesurefile | 2 +- makesure_stable | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makesurefile b/Makesurefile index 6e8cbc8..2d6fe6f 100644 --- a/Makesurefile +++ b/Makesurefile @@ -135,7 +135,7 @@ function trim(s) { sub(/^[ \t\r\n]+/, "", s); sub(/[ \t\r\n]+$/, "", s); return in_begin && /^}/ { in_begin=0 } in_begin && $1 ~ /^split/ { next } { gsub("\\s*#.+$", ""); gsub(Q, Q "\\" Q Q); if (trim($0)) print}' makesure.awk - echo \''$X Makesurefile "$@"' + echo \''"$X" Makesurefile "$@"' } > makesure_stable @goal default diff --git a/makesure_stable b/makesure_stable index a68688a..7ab4969 100755 --- a/makesure_stable +++ b/makesure_stable @@ -585,4 +585,4 @@ function isDir(path) { return ok("test -d " quoteArg(path)) } function rm(f) { system("rm " quoteArg(f)) } function quoteArg(a) { gsub("'\''", "'\''\\'\'''\''", a); return "'\''" a "'\''" } function trim(s) { sub(/^[ \t\r\n]+/, "", s); sub(/[ \t\r\n]+$/, "", s); return s } -'$X Makesurefile "$@" +'"$X" Makesurefile "$@"