7 SYMBOLS_DIR
="${STAGING_DIR}/usr/share/google-breakpad-symbols"
8 rm -rf "${SYMBOLS_DIR}"
9 mkdir
-p "${SYMBOLS_DIR}"
13 printf "%s: ${fmt}" "${NAME}" "${@}" >&2
18 f
="${TARGET_DIR}${FILE}"
19 if [ ! -e "${f}" ]; then
20 error
"%s: No such file or directory\n" "${FILE}"
22 if [ -d "${f}" ]; then
23 error
"%s: Is a directory\n" "${FILE}"
25 if dump_syms
"${f}" > "${SYMBOLS_DIR}/tmp.sym" 2>/dev
/null
; then
26 hash=$
(head -n1 "${SYMBOLS_DIR}/tmp.sym" | cut
-d ' ' -f 4);
27 filename
=$
(basename "${FILE}");
28 mkdir
-p "${SYMBOLS_DIR}/${filename}/${hash}"
29 mv "${SYMBOLS_DIR}/tmp.sym" "${SYMBOLS_DIR}/${filename}/${hash}/${filename}.sym";
31 error
"Error dumping symbols for: '%s'\n" "${FILE}"
34 rm -rf "${SYMBOLS_DIR}/tmp"