diff options
Diffstat (limited to 'win32/luarocksw.bat')
-rw-r--r-- | win32/luarocksw.bat | 49 |
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 | ||
2 | setlocal | ||
3 | SET MYPATH=%~dp0 | ||
4 | |||
5 | IF NOT [%1]==[] GOTO LETSGO | ||
6 | ECHO Same as 'luarocks' command, except this | ||
7 | ECHO command will pause after completion, allowing for | ||
8 | ECHO examination of output. | ||
9 | ECHO. | ||
10 | ECHO For LuaRocks help use: | ||
11 | ECHO LUAROCKS HELP | ||
12 | ECHO. | ||
13 | ECHO OPTIONS specific for LUAROCKSW: | ||
14 | ECHO REMOVEALL is a command specific to this batch file | ||
15 | ECHO the option takes a FULL ROCKSPEC filename and then | ||
16 | ECHO it will strip path, version and extension info from | ||
17 | ECHO it before executing the LUAROCKS REMOVE command | ||
18 | ECHO Example: | ||
19 | ECHO luarocksw remove "c:\somedir\modulename-1.0-1.rockspec" | ||
20 | ECHO will execute: | ||
21 | ECHO luarocks remove "c:\somedir\modulename-1.0-1.rockspec" | ||
22 | ECHO and will only remove the specific version 1.0 from the | ||
23 | ECHO system. | ||
24 | ECHO luarocksw removeall "c:\somedir\modulename-1.0-1.rockspec" | ||
25 | ECHO will execute: | ||
26 | ECHO luarocks remove modulename | ||
27 | ECHO and will remove all versions of this package | ||
28 | ECHO. | ||
29 | GOTO END | ||
30 | |||
31 | :LETSGO | ||
32 | REM if REMOVEALL command then info must be stripped from the parameter | ||
33 | if [%1]==[removeall] goto REMOVEALL | ||
34 | |||
35 | REM execute LuaRocks and wait for results | ||
36 | echo executing: luarocks %* | ||
37 | call "%MYPATH%luarocks" %* | ||
38 | pause | ||
39 | goto END | ||
40 | |||
41 | :REMOVEALL | ||
42 | for /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 | ||