mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
write sources to /usr/src
This commit is contained in:
parent
836fd6340e
commit
7031ee2d70
1 changed files with 8 additions and 0 deletions
|
|
@ -178,6 +178,12 @@ data/about.txt:/usr/share/site/about:0:0:-rw-rw-r--`;
|
|||
return;
|
||||
f.perms = '-r-xr-xr-x';
|
||||
f.data.content = fn;
|
||||
vfsapi.mkFile('/usr/src/'+name+'.js');
|
||||
f = vfsapi.getNode('/usr/src/'+name+'.js');
|
||||
if (!f)
|
||||
return;
|
||||
f.perms = '-rw-rw-r--';
|
||||
f.data.content = 'function main'+fn.toString().substring(8);
|
||||
}
|
||||
}
|
||||
clite.core.load.script('clite/commands.js',init3);
|
||||
|
|
@ -661,6 +667,7 @@ clite.vfs = {
|
|||
vfsdata.api.mkDir('/usr/home');
|
||||
vfsdata.api.mkDir('/usr/share');
|
||||
vfsdata.api.mkDir('/usr/share/site');
|
||||
vfsdata.api.mkDir('/usr/src');
|
||||
vfsdata.api.mkDir('/var');
|
||||
vfsdata.api.mkFile('/var/logs');
|
||||
|
||||
|
|
@ -860,6 +867,7 @@ clite.term = {
|
|||
var s = document.createElement('span');
|
||||
s.innerText = 'W';
|
||||
tty.data.el.appendChild(s);
|
||||
// TODO: shouldn't need the 0.9 thing, but urgh
|
||||
tty.lines = parseInt((tty.data.el.offsetHeight/s.offsetHeight)*0.9);
|
||||
tty.chars = parseInt((tty.data.el.offsetWidth/s.offsetWidth)*0.8);
|
||||
tty.data.el.removeChild(s);
|
||||
|
|
|
|||
Loading…
Reference in a new issue