Sometimes you want to know how two files in two sites differ.
Place the diffwith.sh file somewhere you can get at it, and either
chmod 755 path/to/diffwith.sh
to make it executable- just know you'll type
bash path/to/diffwith.sh name-of-comparedir
each time, which is legit too.
- Open a terminal at the root of a lando project, ex: /User/tishimself/lando/mysite-pantheon
- run this script with the name of the other lando project you wish to compare
../scripts/local/diffwith.sh myothersite-pantheon
The script then runs a recursive find
and execs diff -q
on each pairing a few times to break out
group of differences. We group the files that live either on one site or the other, then we list out the
filenames that exist in both but differ. We don't list files that are identical!
To break it up for easy digestion, for each dir comparison:
PROCESSING mysite-pantheon HOME ./web/themes/yse/templates/atoms AWAY myothersite-pantheon/web/themes/yse/templates/atoms SUBDIRS ... ONLY HOME ... ONLY AWAY ... DIFFERENCES ...
Since this uses the dir you are in as the 'home', be aware that the 'away' site might have dirs that don't show up because they aren't part of the original dive.