aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2022-06-05 01:30:32 +0300
committerkaotisk <kaotisk@arching-kaos.org>2022-06-05 01:30:32 +0300
commit1e016904fa37c4bc3673dbafa4b9f89fd3db3d1d (patch)
treea203db97e90f30eeaa42fc774138a57b5b002168 /bin
parent1e965d6723ce0a9371d1166d29b246caf5ba8adf (diff)
downloadarching-kaos-tools-1e016904fa37c4bc3673dbafa4b9f89fd3db3d1d.tar.gz
arching-kaos-tools-1e016904fa37c4bc3673dbafa4b9f89fd3db3d1d.tar.bz2
arching-kaos-tools-1e016904fa37c4bc3673dbafa4b9f89fd3db3d1d.zip
New flags and help
Diffstat (limited to 'bin')
-rwxr-xr-xbin/enter21
1 files changed, 17 insertions, 4 deletions
diff --git a/bin/enter b/bin/enter
index 0b74231..3d1897c 100755
--- a/bin/enter
+++ b/bin/enter
@@ -1,15 +1,28 @@
#!/bin/bash
-
+usage(){
+ echo "enter - Crawl an arching kaos chain"
+ echo "-----------------------------------"
+ echo "Usage:"
+ echo " --help, -h Print this help and exit"
+ echo " --chain <ipns-link>, -n <ipns-link> Crawl specified chain"
+ echo " --show-zblocks-only, -z Show only zblocks"
+ echo ""
+ echo "Note that combined flags don't work for now"
+ echo "Running with no flags crawls your chain"
+}
# Start of tests
#entrance="QmW5WVXCJfhb4peHG6cbEdamC24vZzMX2Vz386vpENh38U"
#entrance="QmNjQq7GkuXGF8kFT1z2Mv3i4JhY7sBXVUmHDiR1zkQjoE"
#entrance="QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH"
# End of tests
-
-if [ ! -z "$1" ] && [ "$1" == "-n" ]
+if [ ! -z "$1" ] && [ "$1" == "-h" ] || [ "$1" == "--help" ]
+then
+ usage
+ exit
+elif [ ! -z "$1" ] && [ "$1" == "-n" ]
then
entrance="$(ipns-resolve $2)"
-elif [ ! -z "$1" ] && [ "$1" == "--show-zblocks-only" ]
+elif [ ! -z "$1" ] && [ "$1" == "--show-zblocks-only" ] || [ "$1" == "-z" ]
then
# Enter temp folder
TEMPASSIN="/tmp/aktmp_$(date -u +%s)"