]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm.macros
- more checking
[packages/rpm-build-macros.git] / rpm.macros
index 8064a617355b118a39bcc11c77b7b1344ce49091..843f44b51a1dc4a6df6a8aef5f1626851357c199 100644 (file)
@@ -1608,7 +1608,7 @@ fi \
 f = io.open("%{_docdir}/%{name}-%{version}/optional-packages.txt", "r") \
 if f then \
        for l in f:lines() do print(l); end \
-       f.close() \
+       f:close() \
 end \
 %{nil}
 
@@ -1969,7 +1969,10 @@ end\
 for _, s in ipairs({%{expand:%%__lua_split %*}}) do\
        if not t[s] then\
                print("Adding "..s.." to /etc/shells")\
-               f = io.open("/etc/shells", "a"); f:write(s.."\\n"); f:close()\
+               f = io.open("/etc/shells", "a")
+               if f then\
+                       f:write(s.."\\n")\
+                       f:close()\
        end\
 end\
 %{nil}
This page took 0.055462 seconds and 4 git commands to generate.