mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Some cleanup
This commit is contained in:
parent
24af6f21eb
commit
b0f392522b
19 changed files with 286 additions and 8 deletions
|
|
@ -3,6 +3,7 @@ import {
|
|||
doesExecutableExistOnSystem,
|
||||
removeLinesMatchingPattern,
|
||||
getScriptsDir,
|
||||
getSafeChainDir,
|
||||
} from "../helpers.js";
|
||||
import { execSync, spawnSync } from "child_process";
|
||||
import * as os from "os";
|
||||
|
|
@ -41,12 +42,27 @@ function teardown(tools) {
|
|||
eol
|
||||
);
|
||||
|
||||
removeLinesMatchingPattern(
|
||||
startupFile,
|
||||
/^export\s+SAFE_CHAIN_DIR=.*#\s*Safe-chain/,
|
||||
eol
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function setup() {
|
||||
const startupFile = getStartupFile();
|
||||
|
||||
const customDir = getSafeChainDir();
|
||||
if (customDir) {
|
||||
addLineToFile(
|
||||
startupFile,
|
||||
`export SAFE_CHAIN_DIR="${customDir}" # Safe-chain installation directory`,
|
||||
eol
|
||||
);
|
||||
}
|
||||
|
||||
addLineToFile(
|
||||
startupFile,
|
||||
`source ${path.join(getScriptsDir(), "init-posix.sh")} # Safe-chain bash initialization script`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue