implement generateDigests()
This commit is contained in:
parent
600a3898f7
commit
376f15f818
|
@ -63,6 +63,26 @@ function download() {
|
|||
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
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue