implement generateDigests()

This commit is contained in:
belliash 2012-01-18 10:51:59 +01:00
parent 600a3898f7
commit 376f15f818
1 changed files with 20 additions and 0 deletions

View File

@ -63,6 +63,26 @@ function download() {
return ${RESULT} return ${RESULT}
} }
#-------------------------------------------------------------------------------
# Generates a hash file
# Parameters: %digestfile% %filelist%
#-------------------------------------------------------------------------------
function generateDigests() {
if [ "${DIGESTS}" != "" ]; then
local OUTPUT="${1}"
shift
local FILELIST="${@}"
rm -f ${OUTPUT}
for FILE in ${FILELIST}; do
[ ! -f ${FILE} ] && return 1
for DIGEST in ${DIGESTS}; do
shash -a ${DIGEST} ${FILE} >> ${OUTPUT}
done
done
fi
return 0
}
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Creates all 'core' directories necessary for EzBuild to operate # Creates all 'core' directories necessary for EzBuild to operate
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------