kubo/dockertest/server/run.sh
Brian Tiger Chow 9946fc83e0 fix(dockertest): mv file into place
as @whyrusleeping points out, file is created before hash is written

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-15 11:27:25 -08:00

21 lines
774 B
Bash

# must be connected to bootstrap node
ipfs bootstrap add /ip4/$BOOTSTRAP_PORT_4011_TCP_ADDR/tcp/$BOOTSTRAP_PORT_4011_TCP_PORT/QmNXuBh8HFsWq68Fid8dMbGNQTh7eG6hV9rr1fQyfmfomE
# wait for daemon to start/bootstrap
# alternatively use ipfs swarm connect
ipfs daemon &
sleep 3
# TODO instead of bootrapping: ipfs swarm connect /ip4/$BOOTSTRAP_PORT_4011_TCP_ADDR/tcp/$BOOTSTRAP_PORT_4011_TCP_PORT/QmNXuBh8HFsWq68Fid8dMbGNQTh7eG6hV9rr1fQyfmfomE
# must mount this volume from data container
ipfs add -q /data/filetiny > tmptiny
mv tmptiny /data/idtiny
echo added tiny file. hash is $(cat /data/idtiny)
ipfs add -q /data/filerand > tmprand
mv tmprand /data/idrand
echo added rand file. hash is $(cat /data/idrand)
# allow ample time for the client to pull the data
sleep 10000000