Skip to content

Commit

Permalink
units: Implement run_shrink()
Browse files Browse the repository at this point in the history
Make run_shrink() fallback to shell script version of misc/units.

Related:
universal-ctags#2240 (comment)
  • Loading branch information
k-takata committed Oct 31, 2019
1 parent 82788f6 commit ec80aec
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions misc/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,14 @@ def run_result_known_error(msg, f, colorized, *args):
' (KNOWN bug)', file=f)

def run_shrink(cmdline_template, finput, foutput, lang):
# TODO
pass
script = sys.argv[0]
script = os.path.splitext(script)[0] # remove '.py'

print('Shrinking ' + finput + ' as ' + lang)
# fallback to the shell script version
subproces.run([SHELL, script, 'shrink',
'--timeout=1', '--foreground',
cmdline_template, finput, foutput])

# return a filter for normalizing the basename
#
Expand Down

0 comments on commit ec80aec

Please sign in to comment.