diff options
| author | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-07-05 06:39:02 +0500 |
|---|---|---|
| committer | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-07-05 06:39:02 +0500 |
| commit | 274d5b3c55f37c0bc29579a8b1ae5a2bfc0de1be (patch) | |
| tree | f3c4ba1b77812f0984818e6f594cd43c4d5585e8 | |
| parent | 67ec9adcaf09d47bf4d2db4087fe15b8ea460a03 (diff) | |
bot: Add check for files length
Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com>
| -rw-r--r-- | README.md | 1 | ||||
| -rwxr-xr-x | bot.zsh | 10 |
2 files changed, 11 insertions, 0 deletions
@@ -50,6 +50,7 @@ For distribution specific installation commands follow [command-not-found](https * sha1sum * sleep * tr +* wc ## Deployment @@ -59,6 +59,7 @@ busybox=( sha1sum sleep tr + wc ) if [[ -n "${1}" ]] @@ -415,6 +416,15 @@ do fi done +for file in donate help +do + if [[ $(wc -m "${files}/${file}.txt" | parameter 1) -gt 4096 ]] + then + log_text="Error: File ${file}.txt is too large" + . "${units}/log.zsh" + fi +done + if ! [[ -s "${files}/donate.txt" ]] then nocommand_donate=0 |
