18 lines
350 B
Text
18 lines
350 B
Text
-- Get arguments
|
|
local tArgs = { ... }
|
|
if #tArgs == 0 then
|
|
local programName = "eject"
|
|
print("Usage: " .. programName .. " <drive>")
|
|
return
|
|
end
|
|
|
|
local sDrive = tArgs[1]
|
|
|
|
-- Check the disk exists
|
|
local bPresent = disk.isPresent(sDrive)
|
|
if not bPresent then
|
|
print("Nothing in " .. sDrive .. " drive")
|
|
return
|
|
end
|
|
|
|
disk.eject(sDrive)
|