use better commands to list files

This commit is contained in:
rick 2023-02-22 20:24:51 +01:00
parent a77f7d3a09
commit 58388c1153
Signed by: Rick
GPG key ID: 424FAEF68309FB6E

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
################################################################################
# Génère les fichiers HTML de mon site
@ -126,12 +126,12 @@ fi
mkdir $target
for l in $(ls -d $langDir/*/ | cut -d\/ -f2)
for l in $(find $langDir -mindepth 1 -type d -prune -printf "%P\n")
do
generate_header lang/$l/header.link
echo "Create folder $l in $target..."
mkdir "$target/$l"
for i in $(ls $langDir/$l)
for i in $(find $langDir/$l -type f -name "*.html" -printf "%P\n")
do
echo "[$l] Generate $i..."
file="$target/$l/$i"