made the pack completely portable and wrote relevent bat files to go with it
This commit is contained in:
20
gitportable/usr/share/awk/assert.awk
Normal file
20
gitportable/usr/share/awk/assert.awk
Normal file
@@ -0,0 +1,20 @@
|
||||
# assert --- assert that a condition is true. Otherwise, exit.
|
||||
|
||||
#
|
||||
# Arnold Robbins, arnold@skeeve.com, Public Domain
|
||||
# May, 1993
|
||||
|
||||
function assert(condition, string)
|
||||
{
|
||||
if (! condition) {
|
||||
printf("%s:%d: assertion failed: %s\n",
|
||||
FILENAME, FNR, string) > "/dev/stderr"
|
||||
_assert_exit = 1
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
END {
|
||||
if (_assert_exit)
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user