From 92ad4fed0cb600ce55fffacc7e982fbaf955fc44 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 2 Oct 2013 22:18:36 +0000 Subject: lilyglyphs (2oct13) git-svn-id: svn://tug.org/texlive/trunk@31814 c570f23f-e606-0410-a88d-b1316a301751 --- .../scripts/lilyglyphs/lily-glyph-commands.py | 31 +--------------------- 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'Master/texmf-dist/scripts/lilyglyphs/lily-glyph-commands.py') diff --git a/Master/texmf-dist/scripts/lilyglyphs/lily-glyph-commands.py b/Master/texmf-dist/scripts/lilyglyphs/lily-glyph-commands.py index ad6429338db..691652ece6d 100755 --- a/Master/texmf-dist/scripts/lilyglyphs/lily-glyph-commands.py +++ b/Master/texmf-dist/scripts/lilyglyphs/lily-glyph-commands.py @@ -40,36 +40,7 @@ # # # ######################################################################## -import os, sys, argparse - -# import common library, depending on its location -scr_path, scr_name = os.path.split(sys.argv[0]) -if not 'lilyglyphs_common.py' in os.listdir(scr_path): - # the library is not in the same dir as the script - # first check if we're in a CTAN archive directory structure - libpath = os.path.normpath(os.path.join(scr_path, '..', 'lib')) - if 'lilyglyphs_common.py' in os.listdir(libpath): - # we're in a CTAN archive - sys.path.append(libpath) - else: - # we're not in a CTAN archive - # so we assume we're in a TeX installation. - import subprocess - try: - # use TeX's kpsewhich tool to locate the library file - # in the TeX installation - lib = subprocess.check_output(["kpsewhich", - "--progname=lilyglyphs", - "--format=texmfscripts", - "lilyglyphs_common.py"]) - except: - print '\nCommon library \"lilyglyphs_common.py\" not found.' - print 'Please refer to the manual for possible solutions.' - sys.exit(2) - # add the found path to Python's search path - sys.path.append(os.path.split(lib)[0]) - -import lilyglyphs_common as lg +import os, sys, argparse, lilyglyphs_common as lg def main(input_file): """Do the main work of the script""" -- cgit v1.2.3