-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop.sh
More file actions
executable file
·26 lines (17 loc) · 1001 Bytes
/
loop.sh
File metadata and controls
executable file
·26 lines (17 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
set -evo pipefail
export IPFS_PATH=$PWD
while true
do
Rscript --vanilla all-stats.R
ipfs --api $IPFS_API_ADDR pin remote rm --service=pinata --name=marlowestat-all --force || true
ipfs --api $IPFS_API_ADDR add --quieter --pin=false --recursive=true all > marlowe-all.cid
ipfs --api $IPFS_API_ADDR pin remote add --service=pinata --name=marlowestat-all $(cat marlowe-all.cid) || true
ipfs --api $IPFS_API_ADDR name publish --key=marlowestat-all --lifetime=20m $(cat marlowe-all.cid)
Rscript --vanilla external-stats.R
ipfs --api $IPFS_API_ADDR pin remote rm --service=$IPFS_SERVICE --name=marlowestat-ext --force || true
ipfs --api $IPFS_API_ADDR add --quieter --pin=false --recursive=true ext > marlowe-ext.cid
ipfs --api $IPFS_API_ADDR pin remote add --service=$IPFS_SERVICE --name=marlowestat-ext $(cat marlowe-ext.cid) || true
ipfs --api $IPFS_API_ADDR name publish --key=marlowestat-ext --lifetime=20m $(cat marlowe-ext.cid)
sleep 15m
done