8 for file in $
(find "${INSTDIR}/" -name "*.${extension}"); do
9 # store dll/exe itself (needed for minidumps)
10 if [ -f "$file" ]; then
11 cygpath
-w "$file" >> "$list"
14 filename
=$
(basename "$file" ".${extension}")
15 pdb
="${WORKDIR}/LinkTarget/${type}/${filename}.pdb"
16 if [ -f "$pdb" ]; then
17 cygpath
-w "$pdb" >> "$list"
23 if [ -z "${INSTDIR}" ] ||
[ -z "${WORKDIR}" ]; then
24 echo "INSTDIR or WORKDIR not set - script expects calling inside buildenv"
27 if [ ! -d "${INSTDIR}" ] ||
[ ! -d "${WORKDIR}" ]; then
28 echo "INSTDIR or WORKDIR not present - script expects calling after full build"
31 which symstore.exe
> /dev
/null
2>&1 ||
{
32 echo "symstore.exe is expected in the PATH"
38 SYM_PATH
=${WORKDIR}/symstore
40 USAGE
="Usage: $0 [-h|-k <keep_num_versions>|-p <symbol_store_path>]
42 -k <int>: keep this number of old symbol versions around
43 (default: ${MAX_KEEP}. Set to 0 for unlimited)
44 -p <path>: specify full path to symbol store tree
45 If no path is specified, defaults to ${SYM_PATH}.
52 -k|
--keep) MAX_KEEP
="$2"; shift 2;;
53 -p|
--path) SYM_PATH
="$2"; shift 2;;
54 -h|
--help) echo "${USAGE}"; exit 0; shift;;
55 -*) echo "${USAGE}" >&2; exit 1;;
65 # populate symbol store from here
66 TMPFILE
=$
(mktemp
) ||
exit 1
67 trap '{ rm -f ${TMPFILE}; }' EXIT
69 # add dlls and executables
70 add_pdb dll Library
"${TMPFILE}"
71 add_pdb exe Executable
"${TMPFILE}"
73 # stick all of it into symbol store
74 symstore.exe add
/compress /f
"@$(cygpath -w "${TMPFILE}")" /s "$(cygpath -w "${SYM_PATH}")" /t "${PRODUCTNAME}" /v "${LIBO_VERSION_MAJOR}.${LIBO_VERSION_MINOR}.${LIBO_VERSION_MICRO}.${LIBO_VERSION_PATCH}${LIBO_VERSION_SUFFIX}${LIBO_VERSION_SUFFIX_SUFFIX}"
77 # Cleanup symstore, older revisions will be removed. Unless the
78 # .dll/.exe changes, the .pdb should be shared, so with incremental
79 # tinderbox several revisions should not be that space-demanding.
80 if [ "${MAX_KEEP}" -gt 0 ] && [ -d "${SYM_PATH}/000Admin
" ]; then
81 to_remove=$(ls -1 "${SYM_PATH}/000Admin
" | grep -v '\.txt' | grep -v '\.deleted' | sort | head -n "-${MAX_KEEP}")
82 for revision in $to_remove; do
83 symstore.exe del /i "${revision}" /s "$
(cygpath
-w "${SYM_PATH}")"