diff --git a/fml/.gitignore b/fml/.gitignore index 2d07a59c4d..6be4c1fd45 100644 --- a/fml/.gitignore +++ b/fml/.gitignore @@ -2,3 +2,4 @@ /minecraft_server /mods /fmlbuild.properties +/difflist.txt diff --git a/fml/build.xml b/fml/build.xml index 5350756662..a90c46431c 100644 --- a/fml/build.xml +++ b/fml/build.xml @@ -46,7 +46,7 @@ - + @@ -62,11 +62,11 @@ - + - + @@ -74,10 +74,15 @@ - + - + + + + + + @@ -131,17 +136,21 @@ + - - - - - - - - - - + + + + + + + + + + + + + @@ -149,23 +158,26 @@ - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + + + + @@ -173,9 +185,9 @@ - - - + + + diff --git a/fml/generatechangedfilelist.py b/fml/generatechangedfilelist.py new file mode 100644 index 0000000000..e9c71df0dc --- /dev/null +++ b/fml/generatechangedfilelist.py @@ -0,0 +1,26 @@ +import sys +import os +import commands +import fnmatch +import re +import subprocess, shlex + +def cmdsplit(args): + if os.sep == '\\': + args = args.replace('\\', '\\\\') + return shlex.split(args) + +def main(): + md5dir = os.path.abspath(sys.argv[1]) + list_file = os.path.abspath(sys.argv[2]) + prelist = os.path.join(md5dir,"temp","server.md5") + postlist = os.path.join(md5dir,"temp","server_reobf.md5") + cmd = 'diff --unchanged-group-format='' --old-group-format='' --new-group-format=\'%%>\' --changed-group-format=\'%%>\' %s %s' % (prelist, postlist) + process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, bufsize=-1) + difflist,_= process.communicate() + with open(list_file, 'w') as fh: + fh.write(difflist) + + +if __name__ == '__main__': + main()