18 lines
269 B
Bash
Executable File
18 lines
269 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ ! "$1" == "" ]; then
|
|
cd $1
|
|
fi
|
|
|
|
echo "Formatting directory $(pwd)"
|
|
|
|
files=$(find . -type f | grep "\.tex")
|
|
|
|
idx=1
|
|
total=$(echo "$files" | wc -l)
|
|
for file in $files; do
|
|
echo "Processing file $idx / $total"
|
|
latexindent -s -w $file
|
|
((idx++))
|
|
done
|