You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
774 B
20 lines
774 B
2 years ago
|
// Functions to add and remove AO features
|
||
|
import { execSync } from 'child_process'
|
||
|
|
||
|
// Adds a line to .bashrc to make 'ao' an alias for 'ao-cli', to simplify using the AO from the command line
|
||
|
export function installAoAlias() {
|
||
|
try {
|
||
|
execSync('grep "ao=\'ao-cli\'" ~/.bashrc')
|
||
|
console.log('You can already type \'ao\' to launch ao-cli; the alias line already exists in ~/.bashrc.')
|
||
|
} catch(err) {
|
||
|
execSync('echo alias ao=\'ao-cli\' >> .bashrc')
|
||
|
console.log('Added alias line to ~/.bashrc. You can now type \'ao\' to launch ao-cli.')
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Downloads the ao-manual repo to ~/.ao/manual/
|
||
|
export function downloadAoManual() {
|
||
|
console.log(execSync('git clone https://git.coalitionofinvisiblecolleges.org:3009/autonomousorganization/ao-manual.git'))
|
||
|
}
|
||
|
|