diff 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
line wrap: on
line diff
--- a/scripts/build-luan.sh	Tue Mar 22 09:00:59 2022 -0700
+++ b/scripts/build-luan.sh	Mon Mar 28 18:00:12 2022 +0200
@@ -9,7 +9,7 @@
 
 find . -name *.class -delete
 
-. classpath.sh
+. $LUANHOME/classpath.sh
 
 cd $LUANHOME/src
 javac -classpath $CLASSPATH `find . -name *.java`
@@ -28,6 +28,6 @@
 VERSION=`java -classpath $CLASSPATH luan.Luan classpath:luan/version.luan`
 tar -cf luan-$VERSION.tar luan
 
-luan/install.sh
+luan/install.sh || sudo luan/install.sh
 
 echo done