diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2022-06-05 01:30:32 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2022-06-05 01:30:32 +0300 |
commit | 1e016904fa37c4bc3673dbafa4b9f89fd3db3d1d (patch) | |
tree | a203db97e90f30eeaa42fc774138a57b5b002168 /bin | |
parent | 1e965d6723ce0a9371d1166d29b246caf5ba8adf (diff) | |
download | arching-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-x | bin/enter | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -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)" |