2024-09-30

This commit is contained in:
Gennadiy 2024-10-01 18:02:31 +03:00
parent 15d28a54dc
commit 4c0e47830c
3 changed files with 9 additions and 9 deletions

View file

@ -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 "

View file

@ -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 "

View file

@ -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"