Skip to content

Commit

Permalink
add script to check the validity of file content
Browse files Browse the repository at this point in the history
  • Loading branch information
joeaba authored Jan 15, 2022
1 parent eb461a5 commit 1a855aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ netDir=$(
cd "$(dirname "${BASH_SOURCE[0]}")" || exit
echo "$PWD"
)
echo "netDir in net/common is : $netDir"
netConfigDir="$netDir"/config
mkdir -p "$netConfigDir"

SOLANA_ROOT="$netDir"/..
# shellcheck source=scripts/configure-metrics.sh
echo "SOLANA_ROOT in net/common is : $SOLANA_ROOT"
source "$SOLANA_ROOT"/scripts/configure-metrics.sh

configFile="$netConfigDir/config"
Expand Down Expand Up @@ -58,6 +60,7 @@ loadConfigFile() {

# shellcheck source=/dev/null
source "$configFile"
cat "$configFile"
[[ -n "$publicNetwork" ]] || usage "Config file invalid, publicNetwork unspecified: $configFile"
[[ -n "$netBasename" ]] || usage "Config file invalid, netBasename unspecified: $configFile"
[[ -n $sshPrivateKey ]] || usage "Config file invalid, sshPrivateKey unspecified: $configFile"
Expand Down

0 comments on commit 1a855aa

Please sign in to comment.