mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-28 07:25:35 -04:00
Merge branch 'master-MC1.8' of github.com:MightyPirates/OpenComputers into OC1.5-MC1.8
This commit is contained in:
commit
2419f78ee2
@ -299,6 +299,7 @@ javadoc {
|
|||||||
task deobfJar(type: Jar) {
|
task deobfJar(type: Jar) {
|
||||||
from sourceSets.main.output
|
from sourceSets.main.output
|
||||||
exclude "cofh/**"
|
exclude "cofh/**"
|
||||||
|
exclude "mods/**"
|
||||||
configurations.embedded.each { dep ->
|
configurations.embedded.each { dep ->
|
||||||
from(project.zipTree(dep)) {
|
from(project.zipTree(dep)) {
|
||||||
exclude 'META-INF', 'META-INF/**'
|
exclude 'META-INF', 'META-INF/**'
|
||||||
|
@ -10,6 +10,7 @@ if #args < 2 then
|
|||||||
io.write(" -u: copy only when the SOURCE file differs from the destination\n")
|
io.write(" -u: copy only when the SOURCE file differs from the destination\n")
|
||||||
io.write(" file or when the destination file is missing.\n")
|
io.write(" file or when the destination file is missing.\n")
|
||||||
io.write(" -v: verbose output.")
|
io.write(" -v: verbose output.")
|
||||||
|
io.write(" -x: stay on original source file system.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -58,6 +59,15 @@ local function areEqual(path1, path2)
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function isMount(path)
|
||||||
|
path = fs.canonical(path)
|
||||||
|
for _, mountPath in fs.mounts() do
|
||||||
|
if path == fs.canonical(mountPath) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function recurse(fromPath, toPath)
|
local function recurse(fromPath, toPath)
|
||||||
status(fromPath, toPath)
|
status(fromPath, toPath)
|
||||||
if fs.isDirectory(fromPath) then
|
if fs.isDirectory(fromPath) then
|
||||||
@ -72,6 +82,9 @@ local function recurse(fromPath, toPath)
|
|||||||
-- my real cp always does this, even with -f, -n or -i.
|
-- my real cp always does this, even with -f, -n or -i.
|
||||||
return nil, "cannot overwrite non-directory `" .. toPath .. "' with directory `" .. fromPath .. "'"
|
return nil, "cannot overwrite non-directory `" .. toPath .. "' with directory `" .. fromPath .. "'"
|
||||||
end
|
end
|
||||||
|
if options.x and isMount(fromPath) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
fs.makeDirectory(toPath)
|
fs.makeDirectory(toPath)
|
||||||
for file in fs.list(fromPath) do
|
for file in fs.list(fromPath) do
|
||||||
local result, reason = recurse(fs.concat(fromPath, file), fs.concat(toPath, file))
|
local result, reason = recurse(fs.concat(fromPath, file), fs.concat(toPath, file))
|
||||||
|
@ -59,7 +59,7 @@ local name = options.name or "OpenOS"
|
|||||||
io.write("Installing " .. name .." to device " .. (choice.getLabel() or choice.address) .. "\n")
|
io.write("Installing " .. name .." to device " .. (choice.getLabel() or choice.address) .. "\n")
|
||||||
os.sleep(0.25)
|
os.sleep(0.25)
|
||||||
local cpPath = filesystem.concat(findMount(filesystem.get(os.getenv("_")).address), "bin/cp")
|
local cpPath = filesystem.concat(findMount(filesystem.get(os.getenv("_")).address), "bin/cp")
|
||||||
local cpOptions = "-vr" .. (options.u and "ui " or "")
|
local cpOptions = "-vrx" .. (options.u and "ui " or "")
|
||||||
local cpSource = filesystem.concat(findMount(fromAddress), options.fromDir or "/", "*")
|
local cpSource = filesystem.concat(findMount(fromAddress), options.fromDir or "/", "*")
|
||||||
local cpDest = findMount(choice.address) .. "/"
|
local cpDest = findMount(choice.address) .. "/"
|
||||||
local result, reason = os.execute(cpPath .. " " .. cpOptions .. " " .. cpSource .. " " .. cpDest)
|
local result, reason = os.execute(cpPath .. " " .. cpOptions .. " " .. cpSource .. " " .. cpDest)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user