]> git.e2factory.org Git - e2factory.git/commitdiff
implement wrapper for external tool: ln
authorGordon Hecker <gh@emlix.com>
Thu, 1 Oct 2009 12:54:54 +0000 (14:54 +0200)
committerGordon Hecker <gh@emlix.com>
Fri, 2 Oct 2009 10:40:08 +0000 (12:40 +0200)
Signed-off-by: Gordon Hecker <gh@emlix.com>
generic/e2lib.lua

index 3e5660f8c6df4a670eca647c64e7e91bc43316f4..ebe40360617aeafca168bc634142bfae30d649c5 100644 (file)
@@ -1555,6 +1555,20 @@ function e2lib.cp(src, dst, flags)
        return e2lib.call_tool("cp", args)
 end
 
+--- call the ln command
+-- @param src string: source name
+-- @param dst string: destination name
+-- @param flags string: additional flags
+-- @return bool
+-- @return the last line ouf captured output
+function e2lib.ln(src, dst, flags)
+       if not flags then
+               flags = ""
+       end
+       local args = string.format("%s '%s' '%s'", flags, src, dst)
+       return e2lib.call_tool("ln", args)
+end
+
 --- call the curl command
 -- @param args
 -- @return bool