view scripts/install.sh @ 1648:224af797b1f9

Mainly small install script improvements - Consistent usage of `$LUANHOME`, removed reliance on current directory. - Made Luan build and install fine (on Linux) without requiring launching it via sudo. Only asks to elevate privileges if installation failed. - Minor spelling mistake fix.
author Fox
date Mon, 28 Mar 2022 18:00:12 +0200
parents d80395468b4e
children 39d2be9784ab
line wrap: on
line source

set -e

cd `dirname $0`

mkdir -p /usr/local/bin

cat >/usr/local/bin/luan <<End
for i in `pwd`/jars/* ; do CLASSPATH=\$CLASSPATH:\$i ; done

java -classpath \$CLASSPATH luan.Luan "\$@"
End

chmod +x /usr/local/bin/luan

echo "the command 'luan' has been installed"