From 4c0e47830c8d92550dc1a8e3983c92f68128b2f5 Mon Sep 17 00:00:00 2001 From: golovin Date: Tue, 1 Oct 2024 18:02:31 +0300 Subject: [PATCH] 2024-09-30 --- jekyll_site/en/2023/08/04/directory-tree.md | 8 ++++---- jekyll_site/ru/2023/08/03/directory-tree.md | 8 ++++---- serve.sh | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/jekyll_site/en/2023/08/04/directory-tree.md b/jekyll_site/en/2023/08/04/directory-tree.md index fcca8be..848e0ab 100644 --- a/jekyll_site/en/2023/08/04/directory-tree.md +++ b/jekyll_site/en/2023/08/04/directory-tree.md @@ -47,14 +47,14 @@ function directory_tree { if [ -d "$path" ]; then local list # array of files and directories readarray -t list <<<"$(list_directory_contents "$path")" - local len=${#list[@]} # size of array + local size=${#list[@]} # length of array local i # counter - for ((i = 0; i < len; i++)); do + for ((i = 0; i < size; i++)); do if [ -z "${list[$i]}" ]; then continue # skip empty directory - elif ((len == 1)); then + elif ((size == 1)); then directory_tree "$path/${list[$i]}" "$tail" "$tail" "one" - elif ((i < len - 1)); then + elif ((i < size - 1)); then directory_tree "$path/${list[$i]}" "$tail├─ " "$tail│ " else directory_tree "$path/${list[$i]}" "$tail└─ " "$tail " diff --git a/jekyll_site/ru/2023/08/03/directory-tree.md b/jekyll_site/ru/2023/08/03/directory-tree.md index 5fa2c0c..0173065 100644 --- a/jekyll_site/ru/2023/08/03/directory-tree.md +++ b/jekyll_site/ru/2023/08/03/directory-tree.md @@ -46,14 +46,14 @@ function directory_tree { if [ -d "$path" ]; then local list # массив файлов и каталогов readarray -t list <<<"$(list_directory_contents "$path")" - local len=${#list[@]} # размер массива + local size=${#list[@]} # длина массива local i # счётчик - for ((i = 0; i < len; i++)); do + for ((i = 0; i < size; i++)); do if [ -z "${list[$i]}" ]; then continue # пропустить пустой каталог - elif ((len == 1)); then + elif ((size == 1)); then directory_tree "$path/${list[$i]}" "$tail" "$tail" "one" - elif ((i < len - 1)); then + elif ((i < size - 1)); then directory_tree "$path/${list[$i]}" "$tail├─ " "$tail│ " else directory_tree "$path/${list[$i]}" "$tail└─ " "$tail " diff --git a/serve.sh b/serve.sh index 55b689c..a47e006 100755 --- a/serve.sh +++ b/serve.sh @@ -1,4 +1,4 @@ #!/bin/bash echo "Локальное развёртывание для проверки корректности сборки." -jekyll serve --skip-initial-build --disable-disk-cache --host localhost +jekyll serve --skip-initial-build --no-watch --disable-disk-cache --host localhost echo "Адрес сервера: http://localhost:4000"