From 7ca336fe23ffa5a194f1c8316b8d4d6d36615b7e Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 21 Sep 2024 17:45:10 +0300 Subject: Fixed bug in 'ak-zchain --reset' --- lib/_ak_zchain | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/_ak_zchain b/lib/_ak_zchain index a5203a7..c7b6c2e 100755 --- a/lib/_ak_zchain +++ b/lib/_ak_zchain @@ -2,17 +2,18 @@ source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_ipfs source $AK_LIBDIR/_ak_zblock +source $AK_LIBDIR/_ak_script _ak_zchain_reset(){ - echo "Reseting ZLATEST to ZGENESIS" - cp $ZGENESIS $ZLATEST + echo "Reseting AK_ZLATEST to AK_ZGENESIS" + cp $AK_ZGENESIS $AK_ZLATEST if [ $? != 0 ]; then exit 1; fi echo "Make sure /zarchive folder exists within IPFS FS" _ak_ipfs_files_mkdir /zarchive if [ $? != 0 ]; then echo "Folder already there"; fi - echo "Archive the previous ZLATEST" + echo "Archive the previous AK_ZLATEST" _ak_ipfs_files_cp /zlatest /zarchive/$(date -u +%s)-$(_ak_ipfs_files_stat /zlatest | head -n 1) if [ $? != 0 ]; then exit 1; fi @@ -20,13 +21,13 @@ _ak_zchain_reset(){ _ak_ipfs_files_rm /zlatest if [ $? != 0 ]; then exit 1; fi - echo "Copying reset ZLATEST" - CZLATEST="$(cat $ZLATEST)" + echo "Copying reset AK_ZLATEST" + CZLATEST="$(cat $AK_ZLATEST)" _ak_ipfs_files_cp /ipfs/$CZLATEST /zlatest if [ $? != 0 ]; then exit 1; fi - echo "Publishing new (reset) ZLATEST" - _ak_ipfs_name_publish --key=zchain /ipfs/$(cat $ZLATEST) + echo "Publishing new (reset) AK_ZLATEST" + _ak_ipfs_name_publish --key=zchain /ipfs/$(cat $AK_ZLATEST) if [ $? != 0 ]; then exit 1; fi _ak_config_publish -- cgit v1.2.3