Lionel Sambuc 433d6423c3 New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
2014-07-31 16:00:30 +02:00

25 lines
442 B
Bash

#!/bin/sh
#
# srccrc 1.0 - compute CRC checksums of the entire source tree
# Author: Kees J. Bot
cd /usr || exit
{
# List the file names of all files in /usr/include and /usr/src.
find include src/* -type f
} | {
# Sort the list to make them comparable.
sort
} | {
# Remove files like *.o, *.bak, etc.
sed -e '/\.o$/d
/\.a$/d
/\.bak$/d
/\/a\.out$/d
/\/core$/d
/\/bin\/[^/]*$/d'
} | {
# Compute checksums.
xargs crc
}