• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

DhavalKapil/luaver: Lua Version Manager - Managing and switching between differe ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

DhavalKapil/luaver

开源软件地址(OpenSource Url):

https://github.com/DhavalKapil/luaver

开源编程语言(OpenSource Language):

Shell 99.9%

开源软件介绍(OpenSource 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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap