Skip to content

Commit

Permalink
makesure_stable should not be changed before the release #60
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Sep 29, 2021
1 parent ecdee4a commit f73d9a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@
F=makesure_candidate
{
echo '#!/bin/sh'
# We use A, not AWK because otherwise it clashes with AWK set for tests
echo "if command -v gawk >/dev/null;then A='gawk -ltime -v Gawk=1'; X='';else A=awk; X='function gettimeofday(){}';fi"
echo 'exec $A -v "Version='$NEXT_VERSION'" -v "Prog=$0" "$X"'\'
# We use `makesure_awk`, not `AWK` because otherwise it clashes with `AWK` set for tests
# The same we can't just use `A` because it can clash with external config variable that user might want to use
# Since in Posix sh there is no way to declare local var, let's just make names more specific
echo "if command -v gawk >/dev/null;then makesure_awk='gawk -ltime -v Gawk=1';makesure_pre='';else makesure_awk=awk;makesure_pre='function gettimeofday(){}';fi"
echo 'exec $makesure_awk -v "Version='$NEXT_VERSION'" -v "Prog=$0" "$makesure_pre"'\'
awk -v Q=\' '
function trim(s) { sub(/^[ \t\r\n]+/, "", s); sub(/[ \t\r\n]+$/, "", s); return s }
/^BEGIN/ { in_begin=1 }
Expand Down
4 changes: 2 additions & 2 deletions makesure_candidate
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
if command -v gawk >/dev/null;then A='gawk -ltime -v Gawk=1'; X='';else A=awk; X='function gettimeofday(){}';fi
exec $A -v "Version=0.9.10" -v "Prog=$0" "$X"'
if command -v gawk >/dev/null;then makesure_awk='gawk -ltime -v Gawk=1';makesure_pre='';else makesure_awk=awk;makesure_pre='function gettimeofday(){}';fi
exec $makesure_awk -v "Version=0.9.10" -v "Prog=$0" "$makesure_pre"'
BEGIN {
Shell = "bash"
SupportedShells["bash"]
Expand Down

0 comments on commit f73d9a8

Please sign in to comment.