summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/lilyglyphs/lily-glyph-commands.py
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-10-02 22:18:36 +0000
committerKarl Berry <karl@freefriends.org>2013-10-02 22:18:36 +0000
commit92ad4fed0cb600ce55fffacc7e982fbaf955fc44 (patch)
treef28e49ec646b60fb99d783afd1a2bc68b07bf835 /Master/texmf-dist/scripts/lilyglyphs/lily-glyph-commands.py
parent3bf8ee8a87097403ef040c9a3c4ee0f3866eb2cd (diff)
lilyglyphs (2oct13)
git-svn-id: svn://tug.org/texlive/trunk@31814 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/lilyglyphs/lily-glyph-commands.py')
-rwxr-xr-xMaster/texmf-dist/scripts/lilyglyphs/lily-glyph-commands.py31
1 files changed, 1 insertions, 30 deletions
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"""