diff --git a/index.html b/index.html index c96b3ea..5831999 100644 --- a/index.html +++ b/index.html @@ -76,6 +76,7 @@ _ + diff --git a/sys/const.js b/sys/const.js new file mode 100644 index 0000000..5aaa90c --- /dev/null +++ b/sys/const.js @@ -0,0 +1,12 @@ +const APP_REPOSITORY = "app" // Repository url to download apps from +const DEFAULT_APPS = [ + "posh", // required + "hello", + "ppm", + "putils", + "reset", + "vget", + "kfc", + "woman" +] +const STARTUP_COMMAND = [ "/app/posh.js" ] \ No newline at end of file diff --git a/sys/system.js b/sys/system.js index 79d8f7c..ec4c1c7 100644 --- a/sys/system.js +++ b/sys/system.js @@ -168,20 +168,15 @@ async function resetSystem() { createFolder("/temp") createFolder("/etc") - await installPackage("app/hello") - await installPackage("app/posh") - await installPackage("app/ppm") - await installPackage("app/putils") - await installPackage("app/reset") - await installPackage("app/vget") - await installPackage("app/kfc") - await installPackage("app/woman") + for (const app of DEFAULT_APPS) { + await installPackage(APP_REPOSITORY + "/" + app) + } } if (Object.keys(fs_mapping).length == 0) { resetSystem() } -executeCommand(["/app/posh.js"]) +executeCommand(STARTUP_COMMAND) var start_date = new Date() \ No newline at end of file