Skip to content

Instantly share code, notes, and snippets.

@jackschultz jackschultz/linknodes.sh
Last active Jun 29, 2019

Embed
What would you like to do?
Script for linking the jbc repo into another dir to be able to run the node on a different port. The jbc readme has more information.
#!/bin/bash
port=$1
if [ -z "$port" ] #if port isn't assigned
then
echo Need to specify port number
exit 1
fi
FILES=(block.py chain.py config.py mine.py node.py sync.py utils.py genesis.py)
mkdir jbc$port
for file in "${FILES[@]}"
do
echo Syncing $file
ln jbc/$file jbc$port/$file
done
echo Synced new jbc folder for port $port
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.