From 0a101637c6e0c2528b9ea9eb02892da3d862c56c Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 18 Dec 2021 07:50:49 +0200 Subject: Changes - lower case names in ipfs fs - gpg2 to gpg since gpg is the binary on most distributions - add 3 new folders to store references to ZBLOCKs, BLOCKS and DATA --- init.sh | 15 ++++++++++----- 1 file 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 -- cgit v1.2.3