Building simplicidade.org: notes, projects, and occasional rants

Need script: extract common .pm files from multiple directories

I'm re-factoring an old site where the art of source control went out the window somewhere in the past.

The current problem I'm trying to solve is multiple versions of the lib/ directory, each one with their own copies of the same .pm files, but some of them with local modifications.

As a first step I want to create a single central lib/ that will take files that are the same on all the other directories.

We can automate the process by using Digest::SHA1 on each file. If their signatures match, then they are the same file, and can be moved to the central lib/.

Before I write this, does anybody has this script written? Thanks!