]> git.pld-linux.org Git - packages/filesystem.git/commitdiff
- do X11 dir stat in lua auto/th/filesystem-3_0-33
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 22 Feb 2010 19:52:16 +0000 (19:52 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    filesystem.spec -> 1.111

filesystem.spec

index 7b63ff510bfe27787da821366cb23136ef47887f..66b555371a9a03a184a9b703761c9ec5c99168b2 100644 (file)
@@ -130,8 +130,10 @@ check_filesystem_dirs
 %if "%{pld_release}" != "ac"
 %pretrans -p <lua>
 -- this needs to be a dir
--- feel free to write in pure lua, but success on first install is not important.
-os.execute("if [ -L /usr/include/X11 ]; then umask 022; mv -f /usr/include/X11{,.rpmsave}; mkdir -m755 -p /usr/include/X11 && mv -f /usr/include/X11.rpmsave/* /usr/include/X11; fi")
+if posix.stat("/usr/include/X11", "type") == "link" then
+       -- feel free to write in pure lua, but success on first install is not important.
+       os.execute("umask 022; mv -f /usr/include/X11{,.rpmsave}; mkdir -m755 -p /usr/include/X11 && mv -f /usr/include/X11.rpmsave/* /usr/include/X11")
+end
 %endif
 
 %files
This page took 0.100504 seconds and 4 git commands to generate.