mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Some more cleanup
This commit is contained in:
parent
d064d46668
commit
031c9683b1
23 changed files with 55 additions and 864 deletions
|
|
@ -34,19 +34,13 @@ function teardown(tools) {
|
|||
);
|
||||
}
|
||||
|
||||
// Marker comment ensures only safe-chain-added lines are removed, not user's own source statements
|
||||
// Removes the line that sources the safe-chain bash initialization script.
|
||||
removeLinesMatchingPattern(
|
||||
startupFile,
|
||||
/^source\s+.*init-posix\.sh.*#\s*Safe-chain/,
|
||||
eol
|
||||
);
|
||||
|
||||
removeLinesMatchingPattern(
|
||||
startupFile,
|
||||
/^export\s+SAFE_CHAIN_DIR=.*#\s*Safe-chain/,
|
||||
eol
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -131,19 +125,20 @@ function cygpathw(path) {
|
|||
}
|
||||
}
|
||||
|
||||
/** @param {string} preamble */
|
||||
function buildManualInstructions(preamble) {
|
||||
const instructions = [preamble, ` source ${path.join(getScriptsDir(), "init-posix.sh")}`];
|
||||
instructions.push(`Then restart your terminal or run: source ~/.bashrc`);
|
||||
return instructions;
|
||||
}
|
||||
|
||||
function getManualTeardownInstructions() {
|
||||
return buildManualInstructions(`Remove the following line from your ~/.bashrc file:`);
|
||||
return [
|
||||
`Remove the following line from your ~/.bashrc file:`,
|
||||
` source ${path.join(getScriptsDir(), "init-posix.sh")}`,
|
||||
`Then restart your terminal or run: source ~/.bashrc`,
|
||||
];
|
||||
}
|
||||
|
||||
function getManualSetupInstructions() {
|
||||
return buildManualInstructions(`Add the following line to your ~/.bashrc file:`);
|
||||
return [
|
||||
`Add the following line to your ~/.bashrc file:`,
|
||||
` source ${path.join(getScriptsDir(), "init-posix.sh")}`,
|
||||
`Then restart your terminal or run: source ~/.bashrc`,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue