better filetree

parent 898ecaf7
Pipeline #61474624 passed with stages
in 2 minutes and 10 seconds
......@@ -9,18 +9,21 @@ else
fi
OLDIFS=$IFS
files=($(find docs/ -type f))
files=($(tree -if))
echo "- $date [${#files[@]}]:"
for file in ${files[@]}; do
echo -n " - $file"
if [[ "$file" =~ ^docs/ ]] && [[ "$file" =~ \.md$ ]] ; then
file=$(echo $file | sed 's/^docs\///g')
#echo -n " - $file"
if [[ "$file" =~ ^./docs/ ]] && [[ "$file" =~ \.md$ ]] ; then
file=$(echo $file | sed 's/^\.\/docs\///g')
file=$(echo $file | sed 's/\.md$//g')
if [ "$file" == "index" ]; then continue; fi
if [ $DRYRUN -ne 1 ]; then
echo -e "\t- [$file]($file)" >> docs/index.md
else
echo -e "\t- [$file]($file)"
fi
echo " ---> $file"
else
echo " ---> skip"
#echo " ---> $file"
#else
#echo " ---> skip"
fi
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment