3 # Update the copyright files for utilities that are bundled in the DBAN source
4 # tarball. This script assumes a Debian system, which is where I usually work.
6 if [ ! -e /etc
/debian_version
]
8 echo "Error: This script is intended for Debian systems."
15 DBAN_BASENAME
=$
(basename "$i")
16 DBAN_WHICH
=$
(which "$DBAN_BASENAME")
18 # Check whether a package specifically provides the file.
19 DBAN_PACKAGE
=$
(dpkg
-S $DBAN_WHICH | cut
-f1 -d:)
21 if [ "X$DBAN_PACKAGE" == "X" ]
23 # Just use the first package that provides the name.
24 DBAN_PACKAGE
="`dpkg -S $DBAN_BASENAME | cut -f1 -d: | head -n1`"
27 if [ "X$DBAN_PACKAGE" != "X" ]
29 mkdir
-v -p "./doc/$DBAN_PACKAGE"
30 cp -v "/usr/share/doc/$DBAN_PACKAGE/copyright" "./doc/$DBAN_PACKAGE/"