mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-11 15:24:05 +09:00
tvdos installer wip
This commit is contained in:
29
assets/disk0/tvdos/installer/install.js
Normal file
29
assets/disk0/tvdos/installer/install.js
Normal file
@@ -0,0 +1,29 @@
|
||||
println("let's install!")
|
||||
|
||||
|
||||
function copyFiles(destDrive) {
|
||||
function dir(path) {
|
||||
return `${destDrive}:/${path}`
|
||||
}
|
||||
|
||||
const dos = _G.shell.coreutils
|
||||
|
||||
dos.mkdir(dir("home"))
|
||||
dos.mkdir(dir("tvdos"))
|
||||
dos.mkdir(dir("tvdos\\bin"))
|
||||
|
||||
// tvdos/bin
|
||||
files.open("A:\\tvdos\\bin").list().forEach((file)=>{
|
||||
dos.cp(file.fullPath, `${destDrive}:${file.path}`)
|
||||
})
|
||||
|
||||
// tvdos
|
||||
;["gl.js", "TVDOS.SYS", "us_colemak.key", "us_qwerty.key"].forEach((name)=>{
|
||||
dos.cp(`A:\\tvdos\\${name}`, `${destDrive}:\\tvdos\\${name}`)
|
||||
})
|
||||
|
||||
// bare files in the root dir
|
||||
;["!BOOTSEC", "AUTOEXEC.BAT"].forEach((name)=>{
|
||||
dos.cp(`A:\\tvdos\\installer\\${name}`, `${destDrive}:\\${name}`)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user