Command line tool to manage and switch between different versions of lua, LuaJIT and luarocks.
- Installs/Uninstalls any version of 'lua', 'LuaJIT' or 'luarocks' with a single command.
- Switches between different versions of 'lua', 'LuaJIT' or 'luarocks' easily and without glitches.
- Consistency between 'lua' and 'luarocks' maintained - Rocks and configurations for different lua versions are stored differently.
Requires wget
, make
.
You may need to install some dependencies:
sudo apt-get install libreadline-dev
Also, if you are planning to install earlier versions of Lua(which are 32 bit) on 64 bit machines, you may need to install some 32 bit libraries first:
sudo apt-get install lib32ncurses5-dev
Run the following command to install
curl https://raw.githubusercontent.com/dhavalkapil/luaver/master/install.sh -o install.sh && . ./install.sh
luaver install 5.3.1 # Installs lua version 5.3.1
luaver install 5.3.0 # Installs lua version 5.3.0
luaver use 5.3.1 # Switches to lua version 5.3.1
luaver install-luarocks 2.3.0 # Installs luarocks version 2.3.0
luaver uninstall 5.3.0 # Uninstalls lua version 5.3.0
luaver help
Usage:
luaver help Displays this message
luaver install <version> Installs lua-<version>
luaver use <version> Switches to lua-<version>
luaver set-default <version> Sets <version> as default for lua
luaver unset-default Unsets the default lua version
luaver uninstall <version> Uninstalls lua-<version>
luaver list Lists installed lua versions
luaver install-luajit <version> Installs LuaJIT-<version>
luaver use-luajit <version> Switches to LuaJIT-<version>
luaver set-default-luajit <version> Sets <version> as default for LuaJIT
luaver unset-default-luajit Unsets the default LuaJIT version
luaver uninstall-luajit <version> Uninstalls LuaJIT-<version>
luaver list-luajit Lists installed LuaJIT versions
luaver install-luarocks <version> Installs luarocks<version>
luaver use-luarocks <version> Switches to luarocks-<version>
luaver set-default-luarocks <version> Sets <version> as default for luarocks
luaver unset-default-luarocks Unsets the default luarocks version
luaver uninstall-luarocks <version> Uninstalls luarocks-<version>
luaver list-luarocks Lists all installed luarocks versions
luaver current Lists present versions being used
luaver version Displays luaver version
Feel free to file issues and submit pull requests – contributions are welcome.
luaver is licensed under the MIT license.