54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
extra_data=''
;;
symlink)
stat_format='%Y'
extra_data="$(readlink "${filename}")"
;;
file)
stat_format='%Y,%s'
filename_hash="$(sha1 "${filename}")"
extra_data="${filename_hash}"
filename_intree="${appfsdir}/sha1/${filename_hash}"
if [ ! -e "${filename_intree}" ]; then
cat "${filename}" > "${filename_intree}.tmp"
mv "${filename_intree}.tmp" "${filename_intree}"
|
>
>
>
>
>
>
|
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
extra_data=''
;;
symlink)
stat_format='%Y'
extra_data="$(readlink "${filename}")"
;;
file)
if [ -x "${filename}" ]; then
extra_data='x'
else
extra_data=''
fi
stat_format='%Y,%s'
filename_hash="$(sha1 "${filename}")"
extra_data="${extra_data},${filename_hash}"
filename_intree="${appfsdir}/sha1/${filename_hash}"
if [ ! -e "${filename_intree}" ]; then
cat "${filename}" > "${filename_intree}.tmp"
mv "${filename_intree}.tmp" "${filename_intree}"
|