- printf "Unpacking corpus\n"
- tar --checkpoint=.5000 --extract --strip-components=1 \
- --directory ${TMP_DIRECTORY} \
- --use-compress-program ${XZ} \
- --file ../download/notmuch-email-corpus-${PERFTEST_VERSION}.tar.xz \
- notmuch-email-corpus/"$arg"
+ if [[ ${#args[@]} > 0 ]]; then
+ if command -v pixz > /dev/null; then
+ XZ=pixz
+ else
+ XZ=xz
+ fi
+
+ printf "Unpacking corpus\n"
+ mkdir -p "${TEST_DIRECTORY}/corpus"
+
+ tar --checkpoint=.5000 --extract --strip-components=1 \
+ --directory ${TEST_DIRECTORY}/corpus \
+ --use-compress-program ${XZ} \
+ --file ../download/notmuch-email-corpus-${PERFTEST_VERSION}.tar.xz \
+ "${args[@]}"
+
+ printf "\n"