comparison scripts/build-luan.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 c8f4867fd083
children aed284cae1f0
comparison
equal deleted inserted replaced
1647:7eddf1e990c0 1648:224af797b1f9
7 mkdir -p build/luan/jars 7 mkdir -p build/luan/jars
8 cp lib/* build/luan/jars 8 cp lib/* build/luan/jars
9 9
10 find . -name *.class -delete 10 find . -name *.class -delete
11 11
12 . classpath.sh 12 . $LUANHOME/classpath.sh
13 13
14 cd $LUANHOME/src 14 cd $LUANHOME/src
15 javac -classpath $CLASSPATH `find . -name *.java` 15 javac -classpath $CLASSPATH `find . -name *.java`
16 jar cvf $LUANHOME/build/luan/jars/luan.jar `find . -name *.class -o -name *.luan` 16 jar cvf $LUANHOME/build/luan/jars/luan.jar `find . -name *.class -o -name *.luan`
17 17
26 26
27 cd build 27 cd build
28 VERSION=`java -classpath $CLASSPATH luan.Luan classpath:luan/version.luan` 28 VERSION=`java -classpath $CLASSPATH luan.Luan classpath:luan/version.luan`
29 tar -cf luan-$VERSION.tar luan 29 tar -cf luan-$VERSION.tar luan
30 30
31 luan/install.sh 31 luan/install.sh || sudo luan/install.sh
32 32
33 echo done 33 echo done