aboutsummaryrefslogtreecommitdiff
path: root/init.sh
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.com>2021-12-18 07:50:49 +0200
committerkaotisk <kaotisk@arching-kaos.com>2021-12-18 07:50:49 +0200
commit0a101637c6e0c2528b9ea9eb02892da3d862c56c (patch)
treeb95ab07e7c85f2eb88dee57c9f3959dbc0a72f68 /init.sh
parent288e24bcd9c1905bc46a5bc97247bc6c9f642634 (diff)
downloadarching-kaos-tools-0a101637c6e0c2528b9ea9eb02892da3d862c56c.tar.gz
arching-kaos-tools-0a101637c6e0c2528b9ea9eb02892da3d862c56c.tar.bz2
arching-kaos-tools-0a101637c6e0c2528b9ea9eb02892da3d862c56c.zip
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
Diffstat (limited to 'init.sh')
-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