Skip to content

Commit

Permalink
Changed name from luavm to luaver and updated function and variable n…
Browse files Browse the repository at this point in the history
…ames by appending __luaver_
  • Loading branch information
DhavalKapil committed Jun 7, 2016
1 parent 36097e2 commit be44412
Show file tree
Hide file tree
Showing 6 changed files with 825 additions and 822 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ before_install:
- wget --version
- curl --version
install:
- curl https://raw.githubusercontent.com/DhavalKapil/luavm/master/install.sh -o install.sh && . ./install.sh
- curl https://raw.githubusercontent.com/dhavalkapil/luaver/master/install.sh -o install.sh && . ./install.sh
script:
- ./tests/test.sh
64 changes: 32 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lua Version Manager - luavm
# Lua Version Manager - luaver

[![Build Status](https://travis-ci.org/DhavalKapil/luavm.svg?branch=master)](https://travis-ci.org/DhavalKapil/luavm)
[![Build Status](https://travis-ci.org/DhavalKapil/luaver.svg?branch=master)](https://travis-ci.org/DhavalKapil/luaver)

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

Expand Down Expand Up @@ -32,54 +32,54 @@ sudo apt-get install lib32ncurses5-dev
Run the following command to install

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

## Usage

### Sample usage:

```sh
luavm install 5.3.1 # Installs lua version 5.3.1
luavm install 5.3.0 # Installs lua version 5.3.0
luavm use 5.3.1 # Switches to lua version 5.3.1
luavm install-luarocks 2.3.0 # Installs luarocks version 2.3.0
luavm uninstall 5.3.0 # Uninstalls lua version 5.3.0
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:

```sh
luavm help
luaver help

Usage:
luavm help Displays this message
luavm install <version> Installs lua-<version>
luavm use <version> Switches to lua-<version>
luavm set-default <version> Sets <version> as default for lua
luavm unset-default Unsets the default lua version
luavm uninstall <version> Uninstalls lua-<version>
luavm list Lists installed lua versions
luavm install-luajit <version> Installs LuaJIT-<version>
luavm use-luajit <version> Switches to LuaJIT-<version>
luavm set-default-luajit <version> Sets <version> as default for LuaJIT
luavm unset-default-luajit Unsets the default LuaJIT version
luavm uninstall-luajit <version> Uninstalls LuaJIT-<version>
luavm list-luajit Lists installed LuaJIT versions
luavm install-luarocks <version> Installs luarocks<version>
luavm use-luarocks <version> Switches to luarocks-<version>
luavm set-default-luarocks <version> Sets <version> as default for luarocks
luavm unset-default-luarocks Unsets the default luarocks version
luavm uninstall-luarocks <version> Uninstalls luarocks-<version>
luavm list-luarocks Lists all installed luarocks versions
luavm current Lists present versions being used
luavm version Displays luavm version
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](https://github.com/DhavalKapil/luavm/issues) and submit [pull requests](https://github.com/DhavalKapil/luavm/pulls) – contributions are welcome.
Feel free to [file issues](https://github.com/DhavalKapil/luaver/issues) and submit [pull requests](https://github.com/DhavalKapil/luaver/pulls) – contributions are welcome.

## License

luavm is licensed under the [MIT license](http://dhaval.mit-license.org/).
luaver is licensed under the [MIT license](http://dhaval.mit-license.org/).
24 changes: 12 additions & 12 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash

PROGRAM="luavm"
SRC_URL="https://raw.githubusercontent.com/DhavalKapil/luavm/master/${PROGRAM}"
PROGRAM="luaver"
SRC_URL="https://raw.githubusercontent.com/dhavalkapil/luaver/master/${PROGRAM}"

# Directories to be used
LUAVM_DIR="${HOME}/.luavm" # The luavm directory
SRC_DIR="${LUAVM_DIR}/src" # Where source code is downloaded
LUA_DIR="${LUAVM_DIR}/lua" # Where lua source is built
LUAJIT_DIR="${LUAVM_DIR}/luajit" # Where luajit source is built
LUAROCKS_DIR="${LUAVM_DIR}/luarocks" # Where luarocks source is built
LUAVER_DIR="${HOME}/.luaver" # The luaver directory
SRC_DIR="${LUAVER_DIR}/src" # Where source code is downloaded
LUA_DIR="${LUAVER_DIR}/lua" # Where lua source is built
LUAJIT_DIR="${LUAVER_DIR}/luajit" # Where luajit source is built
LUAROCKS_DIR="${LUAVER_DIR}/luarocks" # Where luarocks source is built

# Initializes directories

Expand All @@ -24,9 +24,9 @@ init()
{
print "Setting up directory structure..."

if [ ! -e $LUAVM_DIR ]
if [ ! -e $LUAVER_DIR ]
then
mkdir $LUAVM_DIR
mkdir $LUAVER_DIR
fi
if [ ! -e $SRC_DIR ]
then
Expand All @@ -47,11 +47,11 @@ init()
print "Directory structure built..."
}

# Downloads luavm
# Downloads luaver
install()
{
print "Downloading '${PROGRAM}'..."
cd $LUAVM_DIR
cd $LUAVER_DIR
if [ -e $PROGRAM ]
then
print "Existing '${PROGRAM}' detected. Removing it..."
Expand All @@ -66,7 +66,7 @@ install()
# Inserts path variables inside bash rc
set_up_path()
{
local str="[ -s ${LUAVM_DIR}/${PROGRAM} ] && . ${LUAVM_DIR}/${PROGRAM}"
local str="[ -s ${LUAVER_DIR}/${PROGRAM} ] && . ${LUAVER_DIR}/${PROGRAM}"
local shell_type="$(basename $SHELL)"
print "Detected SHELL_TYPE: ${shell_type}"

Expand Down
Loading

0 comments on commit be44412

Please sign in to comment.