diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/shadacat.py | 2 | ||||
-rwxr-xr-x | scripts/update_version_stamp.lua | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/scripts/shadacat.py b/scripts/shadacat.py index 89846427a5..2b71fc2385 100755 --- a/scripts/shadacat.py +++ b/scripts/shadacat.py @@ -66,7 +66,7 @@ except IndexError: def filt(entry): return True else: _filt = filt - def filt(entry): return eval(_filt, globals(), {'entry': entry}) + def filt(entry): return eval(_filt, globals(), {'entry': entry}) # noqa poswidth = len(str(os.stat(fname).st_size or 1000)) diff --git a/scripts/update_version_stamp.lua b/scripts/update_version_stamp.lua index 394c4f7694..11b521fab6 100755 --- a/scripts/update_version_stamp.lua +++ b/scripts/update_version_stamp.lua @@ -13,6 +13,10 @@ local function die(msg) os.exit(0) end +local function iswin() + return package.config:sub(1,1) == '\\' +end + if #arg ~= 2 then die(string.format("Expected two args, got %d", #arg)) end @@ -20,7 +24,8 @@ end local versiondeffile = arg[1] local prefix = arg[2] -local described = io.popen('git describe --first-parent --dirty 2>/dev/null'):read('*l') +local dev_null = iswin() and 'NUL' or '/dev/null' +local described = io.popen('git describe --first-parent --dirty 2>'..dev_null):read('*l') if not described then described = io.popen('git describe --first-parent --tags --always --dirty'):read('*l') end |