diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2010-11-02 20:47:39 -0200 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2010-11-02 20:47:39 -0200 |
| commit | 870d63b8f6ef610161938c253e9bf3df0faa9fe8 (patch) | |
| tree | 4af00bc2c64d4735cc2b675355eff81390d55797 /src | |
| parent | e0e5c21e5b374927cb3b015eaad34e2c804eb091 (diff) | |
| parent | 1725c68ca1f6f4b82f3adf2d2b791091c197230a (diff) | |
| download | luarocks-870d63b8f6ef610161938c253e9bf3df0faa9fe8.tar.gz luarocks-870d63b8f6ef610161938c253e9bf3df0faa9fe8.tar.bz2 luarocks-870d63b8f6ef610161938c253e9bf3df0faa9fe8.zip | |
Merge branch 'master' of github.com:keplerproject/luarocks
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/deps.lua | 2 | ||||
| -rw-r--r-- | src/luarocks/fs/win32/tools.lua | 3 | ||||
| -rw-r--r-- | src/luarocks/pack.lua | 11 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua index a2cdcf08..b10594a3 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua | |||
| @@ -211,7 +211,7 @@ end | |||
| 211 | function parse_dep(dep) | 211 | function parse_dep(dep) |
| 212 | assert(type(dep) == "string") | 212 | assert(type(dep) == "string") |
| 213 | 213 | ||
| 214 | local name, rest = dep:match("^%s*(%a[%w%-]*%w)%s*(.*)") | 214 | local name, rest = dep:match("^%s*([a-zA-Z][a-zA-Z0-9%.%-%_]*)%s*(.*)") |
| 215 | if not name then return nil end | 215 | if not name then return nil end |
| 216 | local constraints = parse_constraints(rest) | 216 | local constraints = parse_constraints(rest) |
| 217 | if not constraints then return nil end | 217 | if not constraints then return nil end |
diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua index c3b5398e..d2613b67 100644 --- a/src/luarocks/fs/win32/tools.lua +++ b/src/luarocks/fs/win32/tools.lua | |||
| @@ -246,7 +246,8 @@ function find(at) | |||
| 246 | local pipe = io.popen(command_at(at, "find 2> NUL")) | 246 | local pipe = io.popen(command_at(at, "find 2> NUL")) |
| 247 | for file in pipe:lines() do | 247 | for file in pipe:lines() do |
| 248 | -- Windows find is a bit different | 248 | -- Windows find is a bit different |
| 249 | if file:sub(1,2)==".\\" then file=file:sub(3) end | 249 | local first_two = file:sub(1,2) |
| 250 | if first_two == ".\\" or first_two == "./" then file=file:sub(3) end | ||
| 250 | if file ~= "." then | 251 | if file ~= "." then |
| 251 | table.insert(result, (file:gsub("\\", "/"))) | 252 | table.insert(result, (file:gsub("\\", "/"))) |
| 252 | end | 253 | end |
diff --git a/src/luarocks/pack.lua b/src/luarocks/pack.lua index e2b59a6f..5546a649 100644 --- a/src/luarocks/pack.lua +++ b/src/luarocks/pack.lua | |||
| @@ -163,9 +163,16 @@ function run(...) | |||
| 163 | return nil, "Argument missing, see help." | 163 | return nil, "Argument missing, see help." |
| 164 | end | 164 | end |
| 165 | 165 | ||
| 166 | local file, err | ||
| 166 | if arg:match(".*%.rockspec") then | 167 | if arg:match(".*%.rockspec") then |
| 167 | return pack_source_rock(arg) | 168 | file, err = pack_source_rock(arg) |
| 168 | else | 169 | else |
| 169 | return pack_binary_rock(arg, version) | 170 | file, err = pack_binary_rock(arg, version) |
| 171 | end | ||
| 172 | if err then | ||
| 173 | return nil, err | ||
| 174 | else | ||
| 175 | print("Packed: "..file) | ||
| 176 | return true | ||
| 170 | end | 177 | end |
| 171 | end | 178 | end |
