ajout de Sheebr + support de shutdown + auto install kernel
This commit is contained in:
@@ -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(' '))
|
||||
Reference in New Issue
Block a user