use better commands to list files
This commit is contained in:
parent
a77f7d3a09
commit
58388c1153
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Génère les fichiers HTML de mon site
|
# Génère les fichiers HTML de mon site
|
||||||
|
@ -126,12 +126,12 @@ fi
|
||||||
|
|
||||||
mkdir $target
|
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
|
do
|
||||||
generate_header lang/$l/header.link
|
generate_header lang/$l/header.link
|
||||||
echo "Create folder $l in $target..."
|
echo "Create folder $l in $target..."
|
||||||
mkdir "$target/$l"
|
mkdir "$target/$l"
|
||||||
for i in $(ls $langDir/$l)
|
for i in $(find $langDir/$l -type f -name "*.html" -printf "%P\n")
|
||||||
do
|
do
|
||||||
echo "[$l] Generate $i..."
|
echo "[$l] Generate $i..."
|
||||||
file="$target/$l/$i"
|
file="$target/$l/$i"
|
||||||
|
|
Loading…
Reference in a new issue