33 lines
817 B
Bash
33 lines
817 B
Bash
#!/bin/bash
|
|
# rdiff.sh - compare .tex files between Dropbox and WSL canonical copy
|
|
DB=$HOME/dropbox/longing/
|
|
WSL=/mnt/e/ldrive/GrailHeart/books/Longing/latex/
|
|
|
|
echo "=== .tex files newer in Dropbox (iPad edits) ==="
|
|
find $DB -name '*.tex' | while read dbfile; do
|
|
relpath=${dbfile#$DB}
|
|
wslfile="$WSL$relpath"
|
|
if [ -f "$wslfile" ]; then
|
|
if [ "$dbfile" -nt "$wslfile" ]; then
|
|
echo " DB newer: $relpath"
|
|
elif [ "$wslfile" -nt "$dbfile" ]; then
|
|
echo " WSL newer: $relpath"
|
|
else
|
|
echo " same: $relpath"
|
|
fi
|
|
else
|
|
echo " DB only: $relpath"
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo "=== .tex files only in WSL ==="
|
|
find $WSL -name '*.tex' | while read wslfile; do
|
|
relpath=${wslfile#$WSL}
|
|
dbfile="$DB$relpath"
|
|
if [ ! -f "$dbfile" ]; then
|
|
echo " WSL only: $relpath"
|
|
fi
|
|
done
|
|
|