summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hvextern/hvextern-checkfile.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-24 21:51:50 +0000
committerKarl Berry <karl@freefriends.org>2022-06-24 21:51:50 +0000
commit0011b6b38cc71f0b81f926200aa8cabe84ae8371 (patch)
tree78dad34df6c0fc3908d0e6d1e0821b67125b429c /Master/texmf-dist/tex/latex/hvextern/hvextern-checkfile.lua
parent49eb2d79fccd3635979501f993bd2baeb13c731b (diff)
hvextern (24jun22)
git-svn-id: svn://tug.org/texlive/trunk@63711 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hvextern/hvextern-checkfile.lua')
-rwxr-xr-xMaster/texmf-dist/tex/latex/hvextern/hvextern-checkfile.lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/hvextern/hvextern-checkfile.lua b/Master/texmf-dist/tex/latex/hvextern/hvextern-checkfile.lua
new file mode 100755
index 00000000000..627f86d6bb8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/hvextern/hvextern-checkfile.lua
@@ -0,0 +1,42 @@
+#!/usr/bin/env texlua
+-----------------------------------------------------------------------
+-- FILE: hvextern-checkfile.lua
+-- DESCRIPTION: check two files for identical code
+-- REQUIREMENTS:
+-- AUTHOR: Herbert Voß
+-- LICENSE: LPPL1.3
+--
+-- $Id: hvextern.lua 578 2022-06-20 16:41:45Z herbert $
+-----------------------------------------------------------------------
+kpse.set_program_name("luatex")
+
+local f = kpse.find_file("hvextern.lua")
+require('hvextern')
+
+--[[
+function GetFileContents(f1,f2)
+ local NewContents, OldContents
+ local File = io.open(f1)
+ if File then
+ NewContents = File:read('*all')
+ File:close()
+ end
+ local File = io.open(f2)
+ if File then
+ OldContents = File:read('*all')
+ File:close()
+ end
+ return NewContents == OldContents
+end
+]]
+
+local f1 = arg[1]
+local f2 = arg[2]
+diffFile = io.open(f1..".diff","w+")
+if GetFileContents(f1,f2) then
+ diffFile:write("\\let\\hvCheckNewFile\\empty")
+else
+ diffFile:write("\\def\\hvCheckNewFile{Code changes}")
+end
+diffFile:close()
+