Skip to content

Commit

Permalink
Release 0.9.9 #45
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Sep 13, 2021
1 parent f9a8326 commit 2a7d630
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
28 changes: 16 additions & 12 deletions makesure_stable
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ function splitKV(arg, kv, n) {
kv[1] = trim(substr(arg,n+1))
}
function handleOptionDefineOverride(arg, kv) {
handleDefineLine(arg)
splitKV(arg, kv)
DefineOverrides[kv[0]] = kv[1]
handleDefineLine(kv[0] "=" quoteArg(kv[1]))
DefineOverrides[kv[0]]
}
function handleOptions() {
checkPreludeOnly()
Expand All @@ -125,13 +125,13 @@ function handleDefine( line,kv) {
$1 = ""
handleDefineLine($0)
}
function handleDefineLine(line, kv) {
function handleDefineLine(line, kv,l) {
if (!DefinesFile)
DefinesFile = executeGetLine("mktemp " Tmp "/makesure.XXXXXXXXXX")
splitKV(line, kv)
if (!(kv[0] in DefineOverrides)) {
handleCodeLine(line)
handleCodeLine("echo " quoteArg(line) " >> " DefinesFile)
handleCodeLine(l = line "; export " kv[0])
handleCodeLine("echo " quoteArg(l) " >> " DefinesFile)
}
}
function handleShell() {
Expand Down Expand Up @@ -306,13 +306,17 @@ body,goalBody,goalBodies,resolvedGoals,exitCode, t0,t1,t2, goalTimed, list) {
} else {
if ("timing" in Options)
t0 = currentTimeMillis()
goalBody[0] = MyDirScript
if ("tracing" in Options)
addLine(goalBody, "set -x")
addLine(goalBody, trim(Code[""]))
exitCode = shellExec(goalBody[0])
if (exitCode != 0)
realExit(exitCode)
if (length(body = trim(Code[""])) > 0) {
goalBody[0] = MyDirScript
if ("tracing" in Options)
addLine(goalBody, "set -x")
addLine(goalBody, body)
exitCode = shellExec(goalBody[0])
if (exitCode != 0) {
print " prelude failed"
realExit(exitCode)
}
}
addLine(definesLine, MyDirScript)
if (DefinesFile)
addLine(definesLine, ". " DefinesFile)
Expand Down
1 change: 1 addition & 0 deletions tests/12_update.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

#@options tracing

@define AWK="${AWK:-awk}"
@define D='/tmp/dirXXX with spaces'
#@define D='/tmp/dirXXX'

Expand Down

0 comments on commit 2a7d630

Please sign in to comment.