lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Mar 3, 2013 at 9:24 PM, Stefan Reich <info@luaos.net> wrote:
Hey ho Lua folk!

If you start a SourceForge project, you get shell access automatically (http://sourceforge.net/apps/trac/sourceforge/wiki/Shell%20service). Which is nice.

But there's no Lua on the system. Here's the fastest way to get an interpreter after you logged in to the shell:

wget luaos.net/getlua.sh && sh getlua.sh

Nice, eh? Please help improve this script - let's make it work everywhere.

Here's the current source:

# getlua.sh
#
# This works, e.g., in a SourceForge shell and produces a Lua 5.2.1 interpreter (as ./lua)
# (SourceForge doesn't provide a Lua interpreter by default)
# by Stefan Reich (info@luaos.net)

wget http://sourceforge.net/projects/safelua/files/lua-base/lua-5.2.1.tar.gz/download
tar xvfz lua-5.2.1.tar.gz
cd lua-5.2.1/
make linux
cp src/lua ../
cd ..
./lua -e "print 'OK: Lua 5.2.1 works! (./lua)'"

Simple, I know... but it's a start! :)

Cheers,
Stefan

PS: Please ignore the voices on this list that might, once again, try to label me insane in any way. I'm not insane at all. Thanks.


I prefer to keep my Lua installations nice and sandboxed, so I also patch the Makefile to make sure that global things don't get in the way or can't be loaded. The last script I was using looks like this:

https://gist.github.com/jnwhiteh/1023085

Perhaps there's something there worth merging in!

- Jim