Skip to content

Lua Version Manager - Managing and switching between different versions of Lua, LuaJIT and Luarocks made easy

License

Notifications You must be signed in to change notification settings

DhavalKapil/luaver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lua Version Manager - luaver

Build Status

Command line tool to manage and switch between different versions of lua, LuaJIT and luarocks.

Features

  1. Installs/Uninstalls any version of 'lua', 'LuaJIT' or 'luarocks' with a single command.
  2. Switches between different versions of 'lua', 'LuaJIT' or 'luarocks' easily and without glitches.
  3. Consistency between 'lua' and 'luarocks' maintained - Rocks and configurations for different lua versions are stored differently.

Requirements

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

Installation

Run the following command to install

curl https://raw.githubusercontent.com/dhavalkapil/luaver/master/install.sh -o install.sh && . ./install.sh

Usage

Sample usage:

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

Complete usage:

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

Contribution

Feel free to file issues and submit pull requests – contributions are welcome.

License

luaver is licensed under the MIT license.

About

Lua Version Manager - Managing and switching between different versions of Lua, LuaJIT and Luarocks made easy

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published