From bf634db74ecdd43263042c2a9f9a25bcb4a5d6ba Mon Sep 17 00:00:00 2001 From: kaotisk Date: Fri, 11 Feb 2022 07:18:19 +0200 Subject: Added debug messages for each step --- init.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'init.sh') diff --git a/init.sh b/init.sh index 943418b..cac7953 100755 --- a/init.sh +++ b/init.sh @@ -18,13 +18,29 @@ if [[ ! -f $ZCHAINASC ]] ; then gpg -bao $ZCHAINASC $ZCHAIN;fi if [[ ! -f $ZZCHAIN ]] ; then echo $(ipfs add -q $ZCHAINASC) > $ZZCHAIN;fi if [[ ! -f $GENESISASC ]] ; then gpg -bao $GENESISASC $GENESIS;fi if [[ ! -f $ZGENESISASC ]] ; then echo $(ipfs add -q $GENESISASC) > $ZGENESISASC;fi +echo "Checking for /zarchive in IPFS FS..." ipfs files ls /zarchive > /dev/null 2>&1 if [ $? != 0 ]; then - ipfs files mkdir /zarchive + ipfs files mkdir /zarchive > /dev/null 2>&1 + if [ $? != 0 ]; then + echo "Error" + else + echo "Created" + fi +else + echo "...Found" fi +echo "Looking for /zlatest..." ipfs files stat /zlatest > /dev/null 2>&1 if [ $? != 0 ]; then ipfs files cp /ipfs/$(cat $ZGENESIS) /zlatest + if [ $? != 0 ]; then + echo "Problem copying $ZGENESIS to /zlatest" + else + echo "Success" + fi +else + echo "...Found" fi # TODO GPG/PGP setup -- cgit v1.2.3