aboutsummaryrefslogtreecommitdiff
path: root/win32/luarocksw.bat
diff options
context:
space:
mode:
Diffstat (limited to 'win32/luarocksw.bat')
-rw-r--r--win32/luarocksw.bat49
1 files changed, 49 insertions, 0 deletions
diff --git a/win32/luarocksw.bat b/win32/luarocksw.bat
new file mode 100644
index 00000000..8ac02920
--- /dev/null
+++ b/win32/luarocksw.bat
@@ -0,0 +1,49 @@
1@echo off
2setlocal
3SET MYPATH=%~dp0
4
5IF NOT [%1]==[] GOTO LETSGO
6ECHO Same as 'luarocks' command, except this
7ECHO command will pause after completion, allowing for
8ECHO examination of output.
9ECHO.
10ECHO For LuaRocks help use:
11ECHO LUAROCKS HELP
12ECHO.
13ECHO OPTIONS specific for LUAROCKSW:
14ECHO REMOVEALL is a command specific to this batch file
15ECHO the option takes a FULL ROCKSPEC filename and then
16ECHO it will strip path, version and extension info from
17ECHO it before executing the LUAROCKS REMOVE command
18ECHO Example:
19ECHO luarocksw remove "c:\somedir\modulename-1.0-1.rockspec"
20ECHO will execute:
21ECHO luarocks remove "c:\somedir\modulename-1.0-1.rockspec"
22ECHO and will only remove the specific version 1.0 from the
23ECHO system.
24ECHO luarocksw removeall "c:\somedir\modulename-1.0-1.rockspec"
25ECHO will execute:
26ECHO luarocks remove modulename
27ECHO and will remove all versions of this package
28ECHO.
29GOTO END
30
31:LETSGO
32REM if REMOVEALL command then info must be stripped from the parameter
33if [%1]==[removeall] goto REMOVEALL
34
35REM execute LuaRocks and wait for results
36echo executing: luarocks %*
37call "%MYPATH%luarocks" %*
38pause
39goto END
40
41:REMOVEALL
42for /f "delims=-" %%a in ("%~n2") do (
43 echo executing: luarocks remove %%a
44 "%MYPATH%luarocks" remove "%%a"
45 pause
46 goto END
47)
48
49:END \ No newline at end of file