aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinit.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/init.sh b/init.sh
index 3c9912b..97f04b2 100755
--- a/init.sh
+++ b/init.sh
@@ -5,22 +5,25 @@ echo "INIT started"
if [[ ! -d $WORKDIR ]] ; then mkdir $WORKDIR ;fi
if [[ ! -d $CONFIGDIR ]] ; then mkdir $CONFIGDIR ;fi
if [[ ! -d $BINDIR ]]; then mkdir $BINDIR ;fi
+if [[ ! -d $ZBLOCKDIR ]]; then mkdir $ZBLOCKDIR ;fi
+if [[ ! -d $BLOCKDIR ]]; then mkdir $BLOCKDIR ;fi
+if [[ ! -d $DATADIR ]]; then mkdir $DATADIR ;fi
if [[ ! -d $ARCHIVESDIR ]]; then mkdir $ARCHIVESDIR ;fi
if [[ ! -f $GENESIS ]] ; then touch $GENESIS;fi
if [[ ! -f $ZGENESIS ]] ; then echo "$(ipfs add -q $GENESIS)" > $ZGENESIS;fi
if [[ ! -f $ZCHAIN ]] ; then echo "$(ipfs key gen zchain)" > $ZCHAIN;fi
if [[ ! -f $ZLATEST ]] ; then cp $ZGENESIS $ZLATEST;fi
-if [[ ! -f $ZCHAINASC ]] ; then gpg2 -bao $ZCHAINASC $ZCHAIN;fi
+if [[ ! -f $ZCHAINASC ]] ; then gpg -bao $ZCHAINASC $ZCHAIN;fi
if [[ ! -f $ZZCHAIN ]] ; then echo $(ipfs add -q $ZCHAINASC) > $ZZCHAIN;fi
-if [[ ! -f $GENESISASC ]] ; then gpg2 -bao $GENESISASC $GENESIS;fi
+if [[ ! -f $GENESISASC ]] ; then gpg -bao $GENESISASC $GENESIS;fi
if [[ ! -f $ZGENESISASC ]] ; then echo $(ipfs add -q $GENESISASC) > $ZGENESISASC;fi
ipfs files ls /zarchive > /dev/null 2>&1
if [ $? != 0 ]; then
ipfs files mkdir /zarchive
fi
-ipfs files stat /ZLATEST > /dev/null 2>&1
+ipfs files stat /zlatest > /dev/null 2>&1
if [ $? != 0 ]; then
- ipfs files cp /ipfs/$(cat $ZGENESIS) /ZLATEST
+ ipfs files cp /ipfs/$(cat $ZGENESIS) /zlatest
fi
# TODO GPG/PGP setup
@@ -33,4 +36,6 @@ fi
# TODO The thing is done, we are sitting on a genesis.
# We also have an IPNS name to use.
-
+if [[ ! -f $BINDIR/json2bash ]] ; then cp json2bash $BINDIR ;fi
+if [[ ! -f $BINDIR/ipfs-starter ]] ; then cp ipfs-starter $BINDIR ;fi
+if [[ ! -f $BINDIR/pack_z_block ]] ; then cp pack_z_block $BINDIR ;fi