@dolik-rce commented on this pull request.


In scripts/update-ctags.py:

> -        shutil.copy('parsers/' + f, dstdir + '/parsers/' + f)
-    elif os.path.exists(f):
-        shutil.copy(f, dstdir + '/parsers/' + f)
-    else:
-        print('Error: Could not find file ' + f + '!')
-        sys.exit(1)
+    shutil.copy(f, dstdir + '/parsers')
+
+os.chdir(dstdir + '/peg')
+peg_dst_files = glob.glob('*.c') + glob.glob('*.h')
+peg_dst_files = list(filter(lambda x: not x.startswith('geany_'), peg_dst_files))
+os.chdir(srcdir + '/peg')
+os.system('make -C {} peg/{}'.format(srcdir, ' peg/'.join(peg_dst_files)))
+print('Copying peg parsers... ({} files)'.format(len(peg_dst_files)))
+for f in peg_dst_files:
+    shutil.copy(f, dstdir + '/peg')

I was actually thinking that the script could use some "readability improvements". Like using functions and giving it some structure... But it seemed a bit out of scope for this PR, so I stayed with the current style.

Would you mind if I implemented it in follow-up PR?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.