aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/_ak_checks1
-rwxr-xr-xlib/_ak_cjdns2
-rwxr-xr-xlib/_ak_coin2
-rwxr-xr-xlib/_ak_config1
-rwxr-xr-xlib/_ak_fm2
-rwxr-xr-xlib/_ak_fs2
-rwxr-xr-xlib/_ak_gpg2
-rwxr-xr-xlib/_ak_hash_exchange2
-rwxr-xr-xlib/_ak_html2
-rwxr-xr-xlib/_ak_ipfs2
-rwxr-xr-xlib/_ak_irc2
-rwxr-xr-xlib/_ak_log1
-rwxr-xr-xlib/_ak_maintainance2
-rwxr-xr-xlib/_ak_network2
-rwxr-xr-xlib/_ak_network_cjdns2
-rwxr-xr-xlib/_ak_network_incoming2
-rwxr-xr-xlib/_ak_network_ipfs2
-rwxr-xr-xlib/_ak_network_stellar2
-rwxr-xr-xlib/_ak_network_utils1
-rwxr-xr-xlib/_ak_network_yggdrasil2
-rwxr-xr-xlib/_ak_node2
-rwxr-xr-xlib/_ak_pkg54
-rwxr-xr-xlib/_ak_sblock2
-rwxr-xr-xlib/_ak_schain2
-rwxr-xr-xlib/_ak_script2
-rwxr-xr-xlib/_ak_settings2
-rwxr-xr-xlib/_ak_sh2
-rwxr-xr-xlib/_ak_smfiles2
-rwxr-xr-xlib/_ak_utils2
-rwxr-xr-xlib/_ak_wallet2
-rwxr-xr-xlib/_ak_yggdrasil2
-rwxr-xr-xlib/_ak_zblock2
-rwxr-xr-xlib/_ak_zchain4
33 files changed, 115 insertions, 1 deletions
diff --git a/lib/_ak_checks b/lib/_ak_checks
index c08863e..90b01ad 100755
--- a/lib/_ak_checks
+++ b/lib/_ak_checks
@@ -41,3 +41,4 @@ function _ak_checks_example_check_for_base64_strings(){
fi
}
+_ak_log_debug "_ak_checks loaded $(caller)"
diff --git a/lib/_ak_cjdns b/lib/_ak_cjdns
index 69e5ffc..76b39db 100755
--- a/lib/_ak_cjdns
+++ b/lib/_ak_cjdns
@@ -198,3 +198,5 @@ function _ak_cjdns_get_ip(){
awk '{print $2}' | \
cut -d'/' -f1
}
+
+_ak_log_debug "_ak_cjdns loaded $(caller)"
diff --git a/lib/_ak_coin b/lib/_ak_coin
index 4c58e2d..413d575 100755
--- a/lib/_ak_coin
+++ b/lib/_ak_coin
@@ -30,3 +30,5 @@ function _ak_coin_stats(){
echo "Coinbase: $COINBASE"
echo "Genesis: $GENESIS"
}
+
+_ak_log_debug "_ak_coin loaded $(caller)"
diff --git a/lib/_ak_config b/lib/_ak_config
index f8b1460..25a9563 100755
--- a/lib/_ak_config
+++ b/lib/_ak_config
@@ -58,3 +58,4 @@ function _ak_config_published(){
_ak_ipfs_cat $(_ak_node_info_ipfs_hash) | jq
}
+_ak_log_debug "_ak_config loaded $(caller)"
diff --git a/lib/_ak_fm b/lib/_ak_fm
index 9947940..d77cac7 100755
--- a/lib/_ak_fm
+++ b/lib/_ak_fm
@@ -51,3 +51,5 @@ function _ak_fm_sort_uniq_file(){
_ak_log_info "Sorting $1... Done!"
fi
}
+
+_ak_log_debug "_ak_fm loaded $(caller)"
diff --git a/lib/_ak_fs b/lib/_ak_fs
index a0a49d3..9bf7022 100755
--- a/lib/_ak_fs
+++ b/lib/_ak_fs
@@ -759,3 +759,5 @@ function _ak_fs_net_cat_from_map_hash(){
_ak_fs_net_cat `_ak_fs_from_map_net_get_root_hash $1` `_ak_fs_from_map_net_get_original_hash $1`
fi
}
+
+_ak_log_debug "_ak_fs loaded $(caller)"
diff --git a/lib/_ak_gpg b/lib/_ak_gpg
index c8cc669..edfc1d7 100755
--- a/lib/_ak_gpg
+++ b/lib/_ak_gpg
@@ -299,3 +299,5 @@ function _ak_gpg_delete_secret_key(){
fi
fi
}
+
+_ak_log_debug "_ak_gpg loaded $(caller)"
diff --git a/lib/_ak_hash_exchange b/lib/_ak_hash_exchange
index 2e39658..e2ce310 100755
--- a/lib/_ak_hash_exchange
+++ b/lib/_ak_hash_exchange
@@ -73,3 +73,5 @@ function _ak_he_url_request_map_hash_from_random_peer(){
_ak_he_url_request_map_hash_from_peer "$(_ak_he_select_random_peer)" "$1"
fi
}
+
+_ak_log_debug "_ak_he loaded $(caller)"
diff --git a/lib/_ak_html b/lib/_ak_html
index 491cb6c..c9a898d 100755
--- a/lib/_ak_html
+++ b/lib/_ak_html
@@ -305,3 +305,5 @@ function _ak_generate_html_zblock(){
printf ' </table>\n'
fi
}
+
+_ak_log_debug "_ak_html loaded $(caller)"
diff --git a/lib/_ak_ipfs b/lib/_ak_ipfs
index d904645..e30c1e1 100755
--- a/lib/_ak_ipfs
+++ b/lib/_ak_ipfs
@@ -564,3 +564,5 @@ function _ak_ipfs_swarm_install(){
function _ak_ipfs_get_config_ipns_key(){
_ak_ipfs_key_list_full | grep 'ak-config' | cut -d ' ' -f 1
}
+
+_ak_log_debug "_ak_ipfs loaded $(caller)"
diff --git a/lib/_ak_irc b/lib/_ak_irc
index 17cfd83..25d3f10 100755
--- a/lib/_ak_irc
+++ b/lib/_ak_irc
@@ -6,3 +6,5 @@ source $AK_LIBDIR/_ak_script
function _ak_irc_connect(){
_ak_not_implemented "LOL"
}
+
+_ak_log_debug "_ak_irc loaded $(caller)"
diff --git a/lib/_ak_log b/lib/_ak_log
index c45794d..b547c4d 100755
--- a/lib/_ak_log
+++ b/lib/_ak_log
@@ -190,4 +190,5 @@ function _ak_log_info(){
_ak_log_message "$PROGRAM" "INFO" "$*"
}
+_ak_log_debug "_ak_log loaded $(caller)"
# vim: set syntax=bash
diff --git a/lib/_ak_maintainance b/lib/_ak_maintainance
index 030060e..bd7441b 100755
--- a/lib/_ak_maintainance
+++ b/lib/_ak_maintainance
@@ -81,3 +81,5 @@ function _ak_maintainance_nuke_all_but_core(){
_ak_log_error "No AK_WORKDIR found or it does not exist"
fi
}
+
+_ak_log_debug "_ak_maintainance loaded $(caller)"
diff --git a/lib/_ak_network b/lib/_ak_network
index a7ef4fc..442bf90 100755
--- a/lib/_ak_network
+++ b/lib/_ak_network
@@ -75,3 +75,5 @@ function _ak_network_connect(){
_ak_network_ipfs_connect_bootstrap
fi
}
+
+_ak_log_debug "_ak_network loaded $(caller)"
diff --git a/lib/_ak_network_cjdns b/lib/_ak_network_cjdns
index 31c587b..9f385f9 100755
--- a/lib/_ak_network_cjdns
+++ b/lib/_ak_network_cjdns
@@ -212,3 +212,5 @@ function _ak_network_cjdns_connect(){
function _ak_network_cjdns_connect_bootstrap(){
_ak_network_cjdns_connect
}
+
+_ak_log_debug "_ak_network_cjdns loaded $(caller)"
diff --git a/lib/_ak_network_incoming b/lib/_ak_network_incoming
index 439dfa2..39eb67f 100755
--- a/lib/_ak_network_incoming
+++ b/lib/_ak_network_incoming
@@ -90,3 +90,5 @@ function _ak_network_incoming_scan(){
fi
fi
}
+
+_ak_log_debug "_ak_network_incoming loaded $(caller)"
diff --git a/lib/_ak_network_ipfs b/lib/_ak_network_ipfs
index da52d12..f666586 100755
--- a/lib/_ak_network_ipfs
+++ b/lib/_ak_network_ipfs
@@ -34,3 +34,5 @@ function _ak_network_ipfs_connect_bootstrap(){
_ak_ipfs_swarm_connect "$peer"
done
}
+
+_ak_log_debug "_ak_network_ipfs loaded $(caller)"
diff --git a/lib/_ak_network_stellar b/lib/_ak_network_stellar
index 5d739ec..cca8ff0 100755
--- a/lib/_ak_network_stellar
+++ b/lib/_ak_network_stellar
@@ -158,3 +158,5 @@ function _ak_network_stellar_show_peers(){
_ak_log_debug "No stellar peers found"
fi
}
+
+_ak_log_debug "_ak_network_stellar loaded $(caller)"
diff --git a/lib/_ak_network_utils b/lib/_ak_network_utils
index bef7936..9f4b8ef 100755
--- a/lib/_ak_network_utils
+++ b/lib/_ak_network_utils
@@ -77,3 +77,4 @@ function _ak_network_utils_pad_ip() { #Pad IP - fill in missing zeros
return
}
+_ak_log_debug "_ak_network_utils loaded $(caller)"
diff --git a/lib/_ak_network_yggdrasil b/lib/_ak_network_yggdrasil
index 4d365ff..6e3b796 100755
--- a/lib/_ak_network_yggdrasil
+++ b/lib/_ak_network_yggdrasil
@@ -114,3 +114,5 @@ function _ak_network_yggdrasil_scan(){
_ak_network_yggdrasil_scan_full
fi
}
+
+_ak_log_debug "_ak_network_yggdrasil loaded $(caller)"
diff --git a/lib/_ak_node b/lib/_ak_node
index 37d8a00..71dec12 100755
--- a/lib/_ak_node
+++ b/lib/_ak_node
@@ -30,3 +30,5 @@ function _ak_node_info_ipfs_hash(){
function _ak_node_info_ipns_key(){
_ak_ipfs_key_list_full | grep 'ak-config' | awk '{print $1}'
}
+
+_ak_log_debug "_ak_node loaded $(caller)"
diff --git a/lib/_ak_pkg b/lib/_ak_pkg
index 1155acd..b3f99e0 100755
--- a/lib/_ak_pkg
+++ b/lib/_ak_pkg
@@ -91,6 +91,58 @@ EOF
done
}
+function _ak_pkg_all_modules_make_release_from_local_directory(){
+ outdir="$(pwd)"
+ if [ ! -z $1 ] && [ -n "$1" ] && [ -d "$1" ]
+ then
+ mod="$(realpath $1)"
+ mod_root="$(echo $mod | rev | cut -d '/' -f 2- | rev)"
+ mod_name="$(basename $mod)"
+ cd ${mod_root}/${mod_name}
+ if [ ! -f version ]
+ then
+ echo -n 'v0.0.0' > version
+ fi
+ mod_version="$(cat version)"
+ outfile="${mod_name}-${mod_version}.tar.gz"
+ fout="${outdir}/${outfile}"
+ if [ ! -f ${fout} ]
+ then
+ tar cfz ${fout} *
+ cd ${outdir}
+ _ak_gpg_sign_detached ${outfile}.asc ${outfile}
+ akfsmap="$(_ak_fs_import ${outfile})"
+ akfsmapsig="$(_ak_fs_import ${outfile}.asc)"
+ cat > data << EOF
+{
+ "package":"$mod_name",
+ "version":"$mod_version",
+ "akfsmap":"$akfsmap",
+ "detach":"$akfsmapsig"
+}
+EOF
+ _ak_zblock_pack pkg/add data
+ else
+ tfile="$(_ak_make_temp_file).tar.gz"
+ tar cfz ${tfile} *
+ hasht="$(sha512sum ${tfile} | cut -d ' ' -f 1)"
+ hashf="$(sha512sum ${fout} | cut -d ' ' -f 1)"
+ if [ "$hashf" != "$hasht" ]
+ then
+ _ak_log_warning "Please manually pick-up your archive from ${tfile} or delete the copy on your directory and rerun."
+ exit 5
+ else
+ _ak_log_info "You already have latest release"
+ exit 0
+ fi
+ fi
+ break
+ else
+ _ak_log_error "You need to provide an existing directory as an argument"
+ exit 1
+ fi
+}
+
function _ak_pkg_install_from_akfsmap(){
TEMP="$(_ak_make_temp_directory)"
cd $TEMP
@@ -175,3 +227,5 @@ function _ak_pkg_uninstall(){
fi
done
}
+
+_ak_log_debug "_ak_pkg loaded $(caller)"
diff --git a/lib/_ak_sblock b/lib/_ak_sblock
index 22706d3..374ac11 100755
--- a/lib/_ak_sblock
+++ b/lib/_ak_sblock
@@ -28,3 +28,5 @@ function _ak_sblock_show(){
_ak_log_error "No sblock hash input"
fi
}
+
+_ak_log_debug "_ak_sblock loaded $(caller)"
diff --git a/lib/_ak_schain b/lib/_ak_schain
index e232cd2..fb138bd 100755
--- a/lib/_ak_schain
+++ b/lib/_ak_schain
@@ -191,3 +191,5 @@ function _ak_sblock_get_latest_from_haystack_of_sblocks(){
function _ak_schain_get_latest(){
_ak_sblock_get_latest_from_haystack_of_sblocks
}
+
+_ak_log_debug "_ak_schain loaded $(caller)"
diff --git a/lib/_ak_script b/lib/_ak_script
index b0a0785..1be8710 100755
--- a/lib/_ak_script
+++ b/lib/_ak_script
@@ -218,3 +218,5 @@ function _ak_countdown_seconds(){
sleep 1
printf "\n"
}
+
+_ak_log_debug "_ak_script loaded $(caller)"
diff --git a/lib/_ak_settings b/lib/_ak_settings
index be01bc9..ce36d10 100755
--- a/lib/_ak_settings
+++ b/lib/_ak_settings
@@ -141,3 +141,5 @@ function _ak_settings_get_sub(){
function _ak_settings_get_all(){
_ak_not_implemented
}
+
+_ak_log_debug "_ak_settings loaded $(caller)"
diff --git a/lib/_ak_sh b/lib/_ak_sh
index a1cf60f..723f238 100755
--- a/lib/_ak_sh
+++ b/lib/_ak_sh
@@ -63,3 +63,5 @@ function _ak_shell(){
esac
done
}
+
+_ak_log_debug "_ak_sh loaded $(caller)"
diff --git a/lib/_ak_smfiles b/lib/_ak_smfiles
index 6cb7ef8..c90a90a 100755
--- a/lib/_ak_smfiles
+++ b/lib/_ak_smfiles
@@ -190,3 +190,5 @@ function _ak_sm_file_splitter(){
# and print the MAPFILEHASH
echo "$MAPFILEHASH"
}
+
+_ak_log_debug "_ak_smfiles loaded $(caller)"
diff --git a/lib/_ak_utils b/lib/_ak_utils
index 98f6ca0..571fff4 100755
--- a/lib/_ak_utils
+++ b/lib/_ak_utils
@@ -43,3 +43,5 @@ function _ak_datetime_unix_to_human(){
date --date=@$1 +%Y%m%d_%H%M%S 2>/dev/null || date -r $1 +%Y%m%d_%H%M%S 2>/dev/null
fi
}
+
+_ak_log_debug "_ak_utils loaded $(caller)"
diff --git a/lib/_ak_wallet b/lib/_ak_wallet
index 644c4ac..8c250dc 100755
--- a/lib/_ak_wallet
+++ b/lib/_ak_wallet
@@ -24,3 +24,5 @@ source $AK_LIBDIR/_ak_gpg
function _ak_wallet_generic(){
_ak_gpg_list_secret_keys_long
}
+
+_ak_log_debug "_ak_wallet loaded $(caller)"
diff --git a/lib/_ak_yggdrasil b/lib/_ak_yggdrasil
index 293340e..a4a2c6f 100755
--- a/lib/_ak_yggdrasil
+++ b/lib/_ak_yggdrasil
@@ -224,3 +224,5 @@ function _ak_yggdrasil_get_ip(){
awk '{print $2}' | \
cut -d'/' -f1
}
+
+_ak_log_debug "_ak_yggdrasil loaded $(caller)"
diff --git a/lib/_ak_zblock b/lib/_ak_zblock
index 83b030c..8d22316 100755
--- a/lib/_ak_zblock
+++ b/lib/_ak_zblock
@@ -864,3 +864,5 @@ function _ak_zblock_announce(){
fi
fi
}
+
+_ak_log_debug "_ak_zblock loaded $(caller)"
diff --git a/lib/_ak_zchain b/lib/_ak_zchain
index 547e773..bec43bb 100755
--- a/lib/_ak_zchain
+++ b/lib/_ak_zchain
@@ -283,7 +283,7 @@ function _ak_zchain_crawl_remote_ipns(){
}
function _ak_zchain_get_latest(){
- cat $AK_ZLATEST
+ cat $AK_ZLATEST | tr -d '\n'
}
# _ak_zchain_announce(){}
@@ -540,3 +540,5 @@ function _ak_zchain_output_types(){
fi
_ak_zchain_output_types $previous
}
+
+_ak_log_debug "_ak_zchain loaded $(caller)"