Last active
April 11, 2016 14:22
-
-
Save tats-u/2397e43aa19af7cc883c2f8a01e7d809 to your computer and use it in GitHub Desktop.
A Bash script to nable LuaJITLaTeX in Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Linux: 原則rootで実行してください | |
# Windows: Git Bashなどで実行してください | |
sed -i -e '/luajitlatex/s/^ *#! *//' `kpsewhich fmtutil.cnf` || exit $? | |
fmtutil-sys --byfmt luajitlatex || exit $? | |
case `uname | tr [:upper:] [:lower:]` in | |
*msys*) | |
break;; | |
*cygwin*) | |
break;; | |
*mingw*) | |
break;; | |
*) | |
DIR=$( dirname $( which luajittex ) ) | |
cat > ${DIR}/luajitlatex <<'EOF' | |
#!/bin/sh | |
exec luajittex --fmt=luajitlatex.fmt $* | |
EOF | |
chmod $( stat -c %a $( which luajittex ) ) ${DIR}/luajitlatex | |
chown $( stat -c %U $( which luajittex ) ) ${DIR}/luajitlatex | |
chgrp $( stat -c %G $( which luajittex ) ) ${DIR}/luajitlatex | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment