Skip to content
Go to file
Cannot retrieve contributors at this time
executable file 31 lines (21 sloc) 734 Bytes
set -ex
script_path="$(dirname "$0")"
# Check the version.
$ipfs version | grep "^ipfs version .*$"
# Init the repo.
$ipfs init
# Show the readme.
$ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme | grep -z "^Hello and Welcome to IPFS!.*$"
# Start the daemon.
$ipfs daemon &
# Check the peers.
sleep 30
$ipfs swarm peers | grep -E "ip4|ip6"
# Get an object from the network.
$ipfs cat /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg > cat.jpg
diff cat.jpg "$script_path/data/expected_cat.jpg"
# Put an object in the network.
hash=`echo "I <3 IPFS snap-test-$(uuidgen)" | $ipfs add -q`
curl "http://localhost:8080/ipfs/$hash" | grep "^I <3 IPFS snap-test-.*$"
You can’t perform that action at this time.