fix: inline testnet-default-channel.js

This commit is contained in:
Michael Vines
2019-06-19 10:30:44 -07:00
parent 6b68e2d610
commit b4c80b1464
3 changed files with 25 additions and 12 deletions

View File

@ -1,7 +1,18 @@
#!/usr/bin/env bash
set -e
channel=$("$(dirname "$0")"/testnet-default-channel.js)
channel=$(
cd "$(dirname "$0")";
node -p '
let p = [
"../lib/node_modules/@solana/web3.js/package.json",
"../@solana/web3.js/package.json",
"../package.json"
].find(require("fs").existsSync);
if (!p) throw new Error("Unable to locate solana-web3.js directory");
require(p)["testnetDefaultChannel"]
'
)
usage() {
exitcode=0