From 5fff248297291eff9b87416bedab556a342d04f6 Mon Sep 17 00:00:00 2001 From: "hinto.janaiyo" Date: Fri, 22 Apr 2022 13:29:06 -0400 Subject: [PATCH] error messages --- CHANGELOG.md | 3 +++ monero-bash | 30 ++++++++++++------------------ src/txt/hashlist | 2 +- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7d8c209..798831eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ * **Traps** - traps are more strict (less chance for data corruption if interrupted during operation) +* **Error** + - error messages are more helpful + # v1.3 ## Updates diff --git a/monero-bash b/monero-bash index 3291e05d..d195cee6 100755 --- a/monero-bash +++ b/monero-bash @@ -135,7 +135,7 @@ if [[ $options = "true" ]]; then daemon|monerod|monero) define_Monero;systemd_Edit ;; xmrig|xmr) define_XMRig;systemd_Edit ;; p2pool|p2p) define_P2Pool;systemd_Edit ;; - *) error_Unknown ;; + *) print_Error "Pick: " ;; esac ;; reset) @@ -144,7 +144,7 @@ if [[ $options = "true" ]]; then *"bash"*|*"Bash"*|*"BASH"*)define_MoneroBash;reset_Template ;; xmrig|xmr) define_XMRig;reset_Template ;; p2pool|p2p) define_P2Pool;reset_Template ;; - *) error_Unknown ;; + *) print_Error "Pick: " ;; esac ;; start) @@ -153,8 +153,7 @@ if [[ $options = "true" ]]; then xmrig|xmr) define_XMRig;process_Start ;; p2pool|p2p) define_P2Pool;process_Start ;; all) mine_Start ;; - "") print_Error "Pick: " ;; - *) error_Unknown ;; + *) print_Error "Pick: " ;; esac ;; stop) @@ -163,8 +162,7 @@ if [[ $options = "true" ]]; then xmrig|xmr) define_XMRig;process_Stop ;; p2pool|p2p) define_P2Pool;process_Stop ;; all) mine_Stop ;; - "") print_Error "Pick: " ;; - *) error_Unknown ;; + *) print_Error "Pick: " ;; esac ;; restart) @@ -173,8 +171,7 @@ if [[ $options = "true" ]]; then xmrig|xmr) define_XMRig;process_Restart ;; p2pool|p2p) define_P2Pool;process_Restart ;; all) mine_Restart ;; - "") print_Error "Pick: " ;; - *) error_Unknown ;; + *) print_Error "Pick: " ;; esac ;; kill) @@ -183,8 +180,7 @@ if [[ $options = "true" ]]; then xmrig|xmr) define_XMRig;process_Kill ;; p2pool|p2p) define_P2Pool;process_Kill ;; all) mine_Kill ;; - "") print_Error "Pick: " ;; - *) error_Unknown ;; + *) print_Error "Pick: " ;; esac ;; full) @@ -192,8 +188,7 @@ if [[ $options = "true" ]]; then daemon|monerod|monero) define_Monero;process_Full ;; xmrig|xmr) define_XMRig;process_Full ;; p2pool|p2p) define_P2Pool;process_Full ;; - "") print_Error "Pick: " ;; - *) error_Unknown ;; + *) print_Error "Pick: " ;; esac ;; watch) @@ -201,8 +196,7 @@ if [[ $options = "true" ]]; then daemon|monerod|monero) watch_Monero ;; xmrig|xmr) watch_XMRig ;; p2pool|p2p) watch_P2Pool ;; - "") print_Error "Pick: " ;; - *) error_Unknown ;; + *) print_Error "Pick: " ;; esac ;; gpg) @@ -212,13 +206,13 @@ if [[ $options = "true" ]]; then case $3 in all|All|ALL) gpg_import_All ;; binaryfate|Binaryfate|monero|Monero|MONERO) gpg_import_Monero ;; - hinto|hinto-janaiyo|Hinto|monero-bash|Monero-Bash) gpg_import_MoneroBash ;; + hinto|hinto-janaiyo|Hinto|*"bash"*|*"Bash"*|*"BASH"*) gpg_import_MoneroBash ;; xmrig|XMRig|XMRIG|Xmrig) gpg_import_XMRig ;; SChernykh|schernykh|SCHERNYKH|p2pool|p2p|P2P|P2Pool|P2POOL) gpg_import_P2Pool ;; - *) error_Unknown ;; + *) print_Error "Pick: " ;; esac ;; - *) error_Unknown ;; + *) print_Error "Did you mean ?" ;; esac ;; upgrade) @@ -271,7 +265,7 @@ if [[ $options = "true" ]]; then case $2 in *"bash"*|*"Bash"*|*"BASH"*) $bwhite; echo -n "Install [monero-bash]? (Y/n) " ;$off - Yes(){ echo "uhh... It's already installed..." ;} + Yes(){ echo "Umm... It's already installed..." ;} No(){ echo "Exiting..." ;exit;} prompt_YESno ;; diff --git a/src/txt/hashlist b/src/txt/hashlist index 74c162b6..f64dbe34 100644 --- a/src/txt/hashlist +++ b/src/txt/hashlist @@ -1,4 +1,4 @@ -1251095bd3edd55ad8853c660d229bbd9e343ebd8cc4eccd470356a2eb2f27ea monero-bash +0c80c846bb54a1ae3c2ebae5e02b0b91bcf7862faa9bb4b3f51446d41c570270 monero-bash 963c01218a8086475c760430dfa539d923619fac07513e74caa657c6dad10439 src/debug 56da6eaf9ccf77a9ffef22f1c969d95ee16e354f3710c9bcc8062adfd3303e0b src/source 78537dcbabd068da59044d2b346ec87c1ecf79b84cf39bee915c76b8f6c5261c src/var