Skip to content

Instantly share code, notes, and snippets.

@jackschultz
Last active June 29, 2019 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackschultz/5bdc628739c9ceae9ec96fadf9ed8557 to your computer and use it in GitHub Desktop.
Save jackschultz/5bdc628739c9ceae9ec96fadf9ed8557 to your computer and use it in GitHub Desktop.
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