|
|
@ -6,16 +6,16 @@ import { detectOS, updateSoftware, installRequired, setNodeVersion } from './scr |
|
|
|
import { checkAoEnvFile, aoEnv, setAoEnv, AO_ENV_FILE_PATH } from './scripts/settings.js' |
|
|
|
import { checkAoEnvFile, aoEnv, setAoEnv, AO_ENV_FILE_PATH } from './scripts/settings.js' |
|
|
|
import { unicornPortal, asciiArt, clearScreen, spinnerWait } from './scripts/console.js' |
|
|
|
import { unicornPortal, asciiArt, clearScreen, spinnerWait } from './scripts/console.js' |
|
|
|
import { welcome, exclaim, roger, farewell } from './scripts/welcome.js' |
|
|
|
import { welcome, exclaim, roger, farewell } from './scripts/welcome.js' |
|
|
|
import { printManualPage, manualFolderAsMenu } from './scripts/manual.js' |
|
|
|
import { printManualPage, manualFolderAsMenu, AO_MANUAL_PATH } from './scripts/manual.js' |
|
|
|
|
|
|
|
import { isFolder } from './scripts/files.js' |
|
|
|
import { sleep } from './scripts/util.js' |
|
|
|
import { sleep } from './scripts/util.js' |
|
|
|
import { tests } from './scripts/tests.js' |
|
|
|
import { tests } from './scripts/tests.js' |
|
|
|
import { headerStyle } from './scripts/chalkStyles.js' |
|
|
|
import { headerStyle } from './scripts/chalkStyles.js' |
|
|
|
import './scripts/strings.js' |
|
|
|
import './scripts/strings.js' |
|
|
|
import { installAoAlias } from './scripts/features.js' |
|
|
|
import { installAoAlias, downloadManual, updateManual } from './scripts/features.js' |
|
|
|
import { startPublicBootstrap } from './scripts/bootstrap.js' |
|
|
|
import { startPublicBootstrap } from './scripts/bootstrap.js' |
|
|
|
|
|
|
|
|
|
|
|
// These should become .env variables that are loaded intelligently
|
|
|
|
// These should become .env variables that are loaded intelligently
|
|
|
|
const MANUAL_PATH = process.env.HOME + '/.ao/manual' |
|
|
|
|
|
|
|
let distro |
|
|
|
let distro |
|
|
|
let memberName |
|
|
|
let memberName |
|
|
|
|
|
|
|
|
|
|
@ -66,10 +66,21 @@ async function mainMenu() { |
|
|
|
while(await testsMenu()) {} |
|
|
|
while(await testsMenu()) {} |
|
|
|
break |
|
|
|
break |
|
|
|
case 'Manual': |
|
|
|
case 'Manual': |
|
|
|
await printManualPage(MANUAL_PATH) // Fencepost case - print overview page
|
|
|
|
if(!isFolder(AO_MANUAL_PATH)) { |
|
|
|
|
|
|
|
console.log("Downloading the AO manual...") |
|
|
|
|
|
|
|
if(downloadManual()) { |
|
|
|
|
|
|
|
console.log("Downloaded the AO Manual from the official git repo via http and saved to", AO_MANUAL_PATH + '.') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
console.log('Failed to download the AO manual, sorry.') |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
updateManual() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
await printManualPage(AO_MANUAL_PATH) // Fencepost case - print overview page
|
|
|
|
let previousChoice = 0 |
|
|
|
let previousChoice = 0 |
|
|
|
do { |
|
|
|
do { |
|
|
|
previousChoice = await manualFolderAsMenu(MANUAL_PATH, 'AO User Manual', 'Back to Main Menu', previousChoice + 1) |
|
|
|
previousChoice = await manualFolderAsMenu(AO_MANUAL_PATH, 'AO User Manual', 'Back to Main Menu', previousChoice + 1) |
|
|
|
} while(previousChoice !== false) |
|
|
|
} while(previousChoice !== false) |
|
|
|
break |
|
|
|
break |
|
|
|
case 'Log Out': |
|
|
|
case 'Log Out': |
|
|
|