diff options
Diffstat (limited to 'Master/bin')
-rwxr-xr-x | Master/bin/alpha-linux/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/amd64-freebsd/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/amd64-kfreebsd/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/i386-cygwin/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/i386-freebsd/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/i386-kfreebsd/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/i386-linux/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/i386-netbsd/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/i386-solaris/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/mips-irix/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/powerpc-aix/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/powerpc-linux/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/sparc-linux/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/sparc-solaris/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/universal-darwin/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/win32/mtxrun.lua | 24 | ||||
-rwxr-xr-x | Master/bin/x86_64-darwin/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/x86_64-linux/mtxrun | 24 | ||||
-rwxr-xr-x | Master/bin/x86_64-solaris/mtxrun | 24 |
19 files changed, 418 insertions, 38 deletions
diff --git a/Master/bin/alpha-linux/mtxrun b/Master/bin/alpha-linux/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/alpha-linux/mtxrun +++ b/Master/bin/alpha-linux/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/amd64-freebsd/mtxrun b/Master/bin/amd64-freebsd/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/amd64-freebsd/mtxrun +++ b/Master/bin/amd64-freebsd/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/amd64-kfreebsd/mtxrun b/Master/bin/amd64-kfreebsd/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/amd64-kfreebsd/mtxrun +++ b/Master/bin/amd64-kfreebsd/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/i386-cygwin/mtxrun b/Master/bin/i386-cygwin/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/i386-cygwin/mtxrun +++ b/Master/bin/i386-cygwin/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/i386-freebsd/mtxrun b/Master/bin/i386-freebsd/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/i386-freebsd/mtxrun +++ b/Master/bin/i386-freebsd/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/i386-kfreebsd/mtxrun b/Master/bin/i386-kfreebsd/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/i386-kfreebsd/mtxrun +++ b/Master/bin/i386-kfreebsd/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/i386-linux/mtxrun b/Master/bin/i386-linux/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/i386-linux/mtxrun +++ b/Master/bin/i386-linux/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/i386-netbsd/mtxrun b/Master/bin/i386-netbsd/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/i386-netbsd/mtxrun +++ b/Master/bin/i386-netbsd/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/i386-solaris/mtxrun b/Master/bin/i386-solaris/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/i386-solaris/mtxrun +++ b/Master/bin/i386-solaris/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/mips-irix/mtxrun b/Master/bin/mips-irix/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/mips-irix/mtxrun +++ b/Master/bin/mips-irix/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/powerpc-aix/mtxrun b/Master/bin/powerpc-aix/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/powerpc-aix/mtxrun +++ b/Master/bin/powerpc-aix/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/powerpc-linux/mtxrun b/Master/bin/powerpc-linux/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/powerpc-linux/mtxrun +++ b/Master/bin/powerpc-linux/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/sparc-linux/mtxrun b/Master/bin/sparc-linux/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/sparc-linux/mtxrun +++ b/Master/bin/sparc-linux/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/sparc-solaris/mtxrun b/Master/bin/sparc-solaris/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/sparc-solaris/mtxrun +++ b/Master/bin/sparc-solaris/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/universal-darwin/mtxrun b/Master/bin/universal-darwin/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/universal-darwin/mtxrun +++ b/Master/bin/universal-darwin/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/win32/mtxrun.lua b/Master/bin/win32/mtxrun.lua index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/win32/mtxrun.lua +++ b/Master/bin/win32/mtxrun.lua @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/x86_64-darwin/mtxrun b/Master/bin/x86_64-darwin/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/x86_64-darwin/mtxrun +++ b/Master/bin/x86_64-darwin/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/x86_64-linux/mtxrun b/Master/bin/x86_64-linux/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/x86_64-linux/mtxrun +++ b/Master/bin/x86_64-linux/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) diff --git a/Master/bin/x86_64-solaris/mtxrun b/Master/bin/x86_64-solaris/mtxrun index cc5ebb478ac..049033a727f 100755 --- a/Master/bin/x86_64-solaris/mtxrun +++ b/Master/bin/x86_64-solaris/mtxrun @@ -2524,8 +2524,28 @@ end function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if os.type == "windows" then + local a = attributes(name) or attributes(dirname(name,".")) + return a and sub(a.permissions,2,2) == "w" + end + local f + local isnew = true + if lfs.isdir(name) then + name = name .. "/mtxtest.txt" + else + f = io.open(name, "rb"); + if f then + f:close() + isnew = false + end + end + f = io.open(name, "wb"); + if f then + f:close() + if isnew then os.remove(name) end + return true + end + return false end function file.is_readable(name) |