This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
FREAX/bin/eject

19 lines
350 B
Text
Raw Permalink Normal View History

2022-07-18 19:33:40 +02:00
-- 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)