From da46d9a01d50b5d9f76261e4880b02f088f24455 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 19 Sep 2008 18:26:06 +0000 Subject: Modified format library to operate on strings rather than files - makes it more flexible. Removed dependencies and unnecessary _to_string functions - use table.concat instead. Changed remove_blanks_comments to parse_lines. Added parse_linesandwords, replace_line, insert_line, and get_line functions from parser.lua and removed parser.lua. Made slight changes to squid and devtools to reflect library changes. git-svn-id: svn://svn.alpinelinux.org/acf/devtools/trunk@1479 ab2d0c66-481e-0410-8bed-d214d4d58bed --- acfupdate-model.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'acfupdate-model.lua') diff --git a/acfupdate-model.lua b/acfupdate-model.lua index ce6252e..99e7451 100644 --- a/acfupdate-model.lua +++ b/acfupdate-model.lua @@ -2,7 +2,6 @@ module (..., package.seeall) -- Load libraries require("fs") -require("format") -- ################################################################################ -- LOCAL FUNCTIONS @@ -63,9 +62,8 @@ function diffs (self) elseif ( fs.is_dir("/usr/share/acf/app/" .. list)) then updateresult = querycmd("/usr/bin/svn -rHEAD diff /usr/share/acf/app/" .. list .. " 2>&1") end - updateresult = format.search_replace({updateresult},"<","[") - updateresult = format.search_replace(updateresult,">","]") - updateresult = table.concat(updateresult, "\n") + updateresult = string.gsub(updateresult,"<","[") + updateresult = string.gsub(updateresult,">","]") table.insert(cmdresult, {name=list, updates=updateresult}) end updates.cmdresult = cmdresult -- cgit v1.2.3