diff options
| author | Jakub Jirutka <jakub@jirutka.cz> | 2017-06-21 01:05:08 +0200 |
|---|---|---|
| committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-06-21 01:05:08 +0200 |
| commit | cab011c4bfe88bf02acb41663f1d0936c4a1b2be (patch) | |
| tree | b7e98152ad9b364dd31eeb1f38e161e9d7e11b7d | |
| parent | 3b9e1e0486cd3274d1350576d1ced23514cb14d8 (diff) | |
| download | lua-aports-cab011c4bfe88bf02acb41663f1d0936c4a1b2be.tar.bz2 lua-aports-cab011c4bfe88bf02acb41663f1d0936c4a1b2be.tar.xz | |
db: avoid silly string duplication using string.rep
| -rw-r--r-- | aports/db.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/aports/db.lua b/aports/db.lua index c2fb292..127f4b3 100644 --- a/aports/db.lua +++ b/aports/db.lua @@ -55,7 +55,9 @@ local function split_apkbuild(line) return nil end local r = {} - local dir,pkgname, pkgver, pkgrel, arch, license, options, depends, makedepends, checkdepends, subpackages, linguas, source, url = string.match(line, "([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)") + local dir, pkgname, pkgver, pkgrel, arch, license, options, depends, + makedepends, checkdepends, subpackages, linguas, source, url = + string.match(line, string.rep("([^|]*)", 14, "|")) r.dir = dir r.pkgname = pkgname r.pkgver = pkgver |
