Git Product home page Git Product logo

luaver's Introduction

Lua Version Manager - luaver

Build Status Join the chat at https://gitter.im/DhavalKapil/luaver License

luaver helps 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, without glitches.
  3. Consistency between 'Lua' and 'Luarocks' maintained - Rocks and configurations for different lua versions are stored differently.
  4. Every terminal session can have a different environment configured. Default versions can also be configured.

gif animation showing usage of luaver

Requirements

Requires make, either of wget or curl.

You may need to install some dependencies:

sudo apt-get install libreadline-dev 

Also, if you are planning to install older versions of Lua(which are 32-bit) on 64-bit machines, you may need to install some 32-bit libraries:

sudo apt-get install lib32ncurses5-dev

Installation

Install script

You can install from the script directly:

curl -fsSL https://raw.githubusercontent.com/dhavalkapil/luaver/master/install.sh | sh -s - -r v1.1.0

Follow the instructions which appears after the luaver installation.

Install using git

  1. Clone this repository into ~/.luaver:

    $ git clone https://github.com/DhavalKapil/luaver.git ~/.luaver
  2. Add . ~/.luaver/luaver to your profile such as .bashrc or .zshrc:

    $ echo "[ -s ~/.luaver/luaver ] && . ~/.luaver/luaver" >> ~/.bashrc
    $ echo "[ -s ~/.luaver/completions/luaver.bash ] && . ~/.luaver/completions/luaver.bash" >> ~/.bashrc
  3. Reload .bashrc or restart the shell to load luaver:

    $ . ~/.bashrc

Update using git

Note: This method only works if luaver was installed using git.

$ cd ~/.luaver && git fetch origin && git reset --hard origin/master

Additional works may be required.

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.

luaver's People

Contributors

dhavalkapil avatar umireon avatar dimitriye98 avatar aajjbb avatar piyush8311 avatar rurban avatar gitter-badger avatar shagunsodhani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.