initial commit
This commit is contained in:
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -d "docs/" ]; then
|
||||
echo "Error: No docs/ directory found!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "build/" ]; then
|
||||
rm -r "build/"
|
||||
fi
|
||||
|
||||
mkdir build/
|
||||
|
||||
for i in docs/*; do
|
||||
TARGET_FOLDER=build/txt/$(echo $i | sed 's/docs\///g')
|
||||
|
||||
echo "--- Generating $TARGET_FOLDER..."
|
||||
|
||||
mkdir -p $TARGET_FOLDER;
|
||||
for j in $(find $i -name "complex-*.txt" -type f | sort); do
|
||||
echo "Including $j..."
|
||||
cat $j >> $TARGET_FOLDER/total.txt
|
||||
printf '\n\n\n' >> $TARGET_FOLDER/total.txt
|
||||
done
|
||||
for j in $(find $i -name "comandor-*.txt" -type f | sort); do
|
||||
echo "Including $j..."
|
||||
cat $j >> $TARGET_FOLDER/total.txt
|
||||
printf '\n\n\n' >> $TARGET_FOLDER/total.txt
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user