Overview
Comment: | Updated to create contents in SHA1 tree |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | 074c41c6ce6ad1f84fe6425e5f9ddc6317b794d9 |
User & Date: | rkeene on 2014-09-08 20:02:19 |
Other Links: | manifest | tags |
Context
2014-09-09
| ||
03:43 | More work on getting children processed check-in: b437874cfb user: rkeene tags: trunk | |
2014-09-08
| ||
20:02 | Updated to create contents in SHA1 tree check-in: 074c41c6ce user: rkeene tags: trunk | |
19:59 | Added script to create simple appfs directory tree for serving check-in: edd156adcd user: rkeene tags: trunk | |
Changes
Modified appfs-mk from [c545d80ced] to [de5f8534e5].
12 12 appfsdir="$(cd "${appfsdir}" && pwd)" 13 13 if [ -z "${appfsdir}" ]; then 14 14 echo "Unable to find appfs directory." >&2 15 15 16 16 exit 1 17 17 fi 18 18 19 +mkdir -p "${appfsdir}/sha1" 20 + 19 21 function sha1() { 20 22 local filename 21 23 22 24 filename="$1" 23 25 24 26 openssl sha1 "${filename}" | sed 's@.*= @@' 25 27 } ................................................................................ 53 55 ;; 54 56 symlink) 55 57 stat_format='%Y' 56 58 extra_data="$(readlink "${filename}")" 57 59 ;; 58 60 file) 59 61 stat_format='%Y,%s' 60 - extra_data="$(sha1 "${filename}")" 62 + filename_hash="$(sha1 "${filename}")" 63 + extra_data="${filename_hash}" 64 + 65 + filename_intree="${appfsdir}/sha1/${filename_hash}" 66 + 67 + if [ ! -e "${filename_intree}" ]; then 68 + cat "${filename}" > "${filename_intree}.tmp" 69 + 70 + mv "${filename_intree}.tmp" "${filename_intree}" 71 + fi 61 72 ;; 62 73 esac 63 74 stat_data="$(stat --format="${stat_format}" "${filename}")" 64 75 65 76 if [ -z "${extra_data}" ]; then 66 77 echo "${type},${stat_data},${extra_data},${filename}" 67 78 else