Skip to content

Commit

Permalink
texlive installation for all platforms (i386, arm64 ...)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Wrede committed Jun 11, 2018
1 parent 0914290 commit c5aa3a0
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions snap/plugins/x-texlive.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,22 @@ def build(self):
p2 = Popen(['{}/install-tl'.format(self.builddir), '-portable',
'-scheme', 'basic'], env=env, stdin=p1.stdout, stdout=PIPE)
output = p2.communicate()[0]
self.run(['{}/texlive/bin/x86_64-linux/tlmgr'.format(self.installdir),
'install'] + extras, env=env)

base_path = os.path.join(self.installdir, 'texlive', 'bin')

tlmgr_path_x86_64 = os.path.join(base_path, 'x86_64-linux', 'tlmgr')
tlmgr_path_i386 = os.path.join(base_path, 'i386-linux', 'tlmgr')
tlmgr_path_armhf = os.path.join(base_path, 'armhf-linux', 'tlmgr')
tlmgr_path_arm64 = os.path.join(base_path, 'aarch64-linux', 'tlmgr')

if os.path.exists(tlmgr_path_x86_64):
self.run([tlmgr_path_x86_64, 'install'] + extras, env=env)
elif os.path.exists(tlmgr_path_i386):
self.run([tlmgr_path_i386, 'install'] + extras, env=env)
elif os.path.exists(tlmgr_path_armhf):
self.run([tlmgr_path_armhf, 'install'] + extras, env=env)
elif os.path.exists(tlmgr_path_arm64):
self.run([tlmgr_path_arm64, 'install'] + extras, env=env)

def _build_environment(self):
env = os.environ.copy()
Expand Down

0 comments on commit c5aa3a0

Please sign in to comment.