5 TMPDIR
="$(mktemp -d -t tor_lib_combining.XXXXXX)"
8 trap 'cd "$ORIGDIR" && rm -rf "$TMPDIR"' 0
11 echo "$(cd "$
(dirname "$1")" >/dev/null && pwd)/$(basename "$1")"
15 # On modern macOS and iOS we need to remove the "__.SYMDEF" and "__.SYMDEF
16 # SORTED" before we repack the archive.
18 if [ "$(uname -s)" = "Darwin" ] ; then
19 find .
-name "__.SYMDEF*" -delete
23 TARGET
=$
(abspath
"$1")
29 abs
=$
(abspath
"$input")
30 dir
="$TMPDIR"/$
(basename "$input" .a
)
36 cd "$TMPDIR" >/dev
/null
38 "${AR:-ar}" "${ARFLAGS:-cru}" library.tmp.a .
/*/**
39 "${RANLIB:-ranlib}" library.tmp.a
40 mv -f library.tmp.a
"$TARGET"