ajout de Sheebr + support de shutdown + auto install kernel

This commit is contained in:
Marc
2021-11-27 13:51:55 +01:00
parent a40aa1c153
commit 7480c8efc8
30 changed files with 1743 additions and 45 deletions
+14
View File
@@ -0,0 +1,14 @@
const fs = require('fs')
let path = process.argv[3] ?? '.'
let optionsArray = process.argv.slice(4) ?? []
let options = []
for(let option of optionsArray){
if(option.startwith("--")) options.push(option.slice)
else if(options.startwith("-")) options.push += option.slice(1).split('').map(el => {return '-' + el})
}
const files = fs.readdirSync(path);
const nonHiddenFiles = files.filter(file => file[0] != '.')
console.log(options.includes('-a') ? files.join(' ') : nonHiddenFiles.join(' '))