浏览代码

implement generateDigests()

master
belliash 8 年前
父节点
当前提交
376f15f818
共有 1 个文件被更改,包括 20 次插入0 次删除
  1. +20
    -0
      libraries/filesystem

+ 20
- 0
libraries/filesystem 查看文件

@ -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
#-------------------------------------------------------------------------------

正在加载...
取消
保存