annotate luan/install.sh @ 23:7c9a45368af2 default tip

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 04 Oct 2024 12:06:16 -0600
parents b14073ab9d07
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21
b14073ab9d07 update luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
1 #!/bin/bash
b14073ab9d07 update luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
2
0
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
3 set -e
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
4
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
5 cd `dirname $0`
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
6
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
7 mkdir -p /usr/local/bin
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
8
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
9 cat >/usr/local/bin/luan <<End
21
b14073ab9d07 update luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
10 #!/bin/bash
b14073ab9d07 update luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
11
0
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
12 for i in `pwd`/jars/* ; do CLASSPATH=\$CLASSPATH:\$i ; done
21
b14073ab9d07 update luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 0
diff changeset
13 CLASSPATH=$(echo -n $CLASSPATH | sed 's/^://')
0
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
14
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
15 java -classpath \$CLASSPATH luan.Luan "\$@"
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
16 End
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
17
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
18 chmod +x /usr/local/bin/luan
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
19
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
20 echo "the command 'luan' has been installed"