#!/bin/bash

#Usage: make_diffs dir1 dir2 dir3 ...
#For each pair of successive directories given on the command line, creates a
#recursive diff between them, saving the result in a file named after the
#second of the two directories.


for (( i = 1; i < $#; i++ )); do
	(( j = i + 1 ));
	diff -u -r -N "${!i}" "${!j}" >`basename "${!j}.diff"`
done
