3 ## live-build(7) - System Build Scripts
4 ## Copyright (C) 2006-2014 Daniel Baumann <mail@daniel-baumann.ch>
6 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7 ## This is free software, and you are welcome to redistribute it
8 ## under certain conditions; see COPYING for details.
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && .
"${LIVE_BUILD}/scripts/build.sh" || .
/usr
/lib
/live
/build.sh
16 # Setting static variables
17 DESCRIPTION
="$(Echo 'create source checksums')"
19 USAGE
="${PROGRAM} [--force]"
23 # Reading configuration files
24 Read_conffiles config
/all config
/common config
/bootstrap config
/chroot config
/binary config
/source
27 if [ "${LB_CHECKSUMS}" = "none" ] ||
[ "${LB_SOURCE}" != "true" ]
32 # Requiring stage file
33 Require_stagefile .build
/config .build
/source_debian
36 Check_stagefile .build
/source_checksums
44 for DIRECTORY
in source
/debian source
/live
46 if [ ! -d ${DIRECTORY} ]
51 for CHECKSUM
in ${LB_CHECKSUMS}
55 CHECKSUMS
="$(echo ${CHECKSUM} | tr [a-z] [A-Z])SUMS"
59 CHECKSUMS
="${CHECKSUM}sum.txt"
63 Echo_message
"Begin creating source ${CHECKSUMS}..."
65 # Remove old checksums
66 if [ -f ${DIRECTORY}/${CHECKSUMS} ]
68 rm -f ${DIRECTORY}/${CHECKSUMS}
71 # Calculating checksums
75 \
! -path './*sum.txt' \
76 -print0 |
sort -z |
xargs -0 ${CHECKSUM}sum > ..
/${CHECKSUMS}
78 cat > ${CHECKSUMS} << EOF
79 ## This file contains the list of ${CHECKSUM} checksums of all files on this
82 ## You can verify them automatically with the 'verify-checksums' boot parameter,
83 ## or, manually with: '${CHECKSUM}sum -c ${CHECKSUMS}'.
88 cat ..
/${CHECKSUMS} >> ${CHECKSUMS}
96 find . |
sed -e 's|^.||g' |
grep "^/" |
sort > ..
/..
/${LIVE_IMAGE_NAME}-source.$
(basename ${DIRECTORY}).contents
100 # Creating stage file
101 Create_stagefile .build
/source_checksums