local/bin: Delete unused crun, ltx.
parent
6ca2152df9
commit
fb4aa2850d
|
@ -1,25 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
cat <<EOF>&2
|
||||
Usage: ${0##*/} FILE [CFLAGS]
|
||||
|
||||
Simulate a C interpreter by compiling, executing and removing file in one run.
|
||||
EOF
|
||||
exit
|
||||
fi
|
||||
|
||||
[ -z "$CC" ] && CC=gcc
|
||||
INPUT="$1"
|
||||
|
||||
shift
|
||||
[ $# -eq 0 ] && set -- -Wall -Wextra -Wshadow -pthread -lm -g3 -O0
|
||||
|
||||
FILE="$(mktemp)"
|
||||
echo "==> $CC \"$INPUT\" -o \"$FILE\" $*"
|
||||
|
||||
$CC "$INPUT" -o "$FILE" "$@"
|
||||
|
||||
echo "==> $FILE"
|
||||
"$FILE"
|
||||
rm "$FILE"
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "-h" ]; then
|
||||
cat <<EOF>&2
|
||||
Usage: ${0##*/} [OPTIONS] [FILES]
|
||||
|
||||
LaTeX quick compiler. It adds the preambule and the "\end{document}"
|
||||
automatically.
|
||||
|
||||
If no FILES are specified, use stdin.
|
||||
|
||||
Options:
|
||||
|
||||
-p PACKAGES: Use the comma separated list of packages.
|
||||
|
||||
EOF
|
||||
exit
|
||||
fi
|
||||
[ "$1" = "--" ] && shift
|
||||
|
||||
## One line is mandatory.
|
||||
PREAMBLE='\documentclass[10pt,a4paper]{article}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage{amsmath,amssymb,amsfonts}\usepackage{geometry}\usepackage{lmodern}\usepackage{marvosym}\usepackage{textcomp}\DeclareUnicodeCharacter{20AC}{\EUR{}}\DeclareUnicodeCharacter{2264}{\leqslant}\DeclareUnicodeCharacter{2265}{\geqslant}'
|
||||
|
||||
if [ "$1" = "-p" ]; then
|
||||
PACKAGES="\usepackage{$2}"
|
||||
shift 2
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
buf="$(cat)"
|
||||
cat <<EOF | pdflatex -file-line-error-style
|
||||
$PREAMBLE
|
||||
$PACKAGES
|
||||
\begin{document}
|
||||
$buf
|
||||
\end{document}
|
||||
EOF
|
||||
|
||||
else
|
||||
for i ; do
|
||||
pdflatex -file-line-error-style -interaction nonstopmode -jobname="${i%.tex}" "$PREAMBLE" "$PACKAGES" "\begin{document}\input" "$i" "\end{document}"
|
||||
done
|
||||
fi
|
Loading…
Reference in New Issue