/usr/bin/th is in torch-trepl 0~20170619-ge5e17e3-6.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #!/bin/sh
# Wrapper for Debian Torch Packages
# Copyright (C) 2016 Zhou Mo <cdluminate@gmail.com>
# BSD-3-Clause
set -e
# the real trepl script
TREPL=/usr/lib/torch-trepl/th
# probe lua interpreters, only luajit (recommend) and
# lua5.1 are supported. Here I don't use hardcoded lua
# interpreter path so user can override the default
# interpreter with `$PATH` instead of modifying this script.
if test -z "`which luajit 1>/dev/null`"; then
LUA=$(which luajit)
else
printf "I: luajit not found, falling back to lua5.1\n";
if test -z "`which lua5.1 1>/dev/null`"; then
LUA=$(which lua5.1)
else
printf "E: lua5.1 not found. No available lua interpreter.\n"
false
fi
fi
# run the real trepl script with possible arguments
exec $LUA $TREPL "$@"
|