Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect the actual tar version present on the system #139

Merged
merged 2 commits into from
Mar 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions scripts/unpack_benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ unlzma_mv_untar () {
if [[ "$TAR_FILE.lzma" -nt "$TAR_FILE" ]] ; then
unlzma -k "$TAR_FILE.lzma"
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
TARVER=`tar --version | head -n 1`
if [[ "$TARVER" =~ "tar (GNU tar)" ]]; then
tar -xf $TAR_FILE
elif [[ "$TARVER" =~ "bsdtar" ]]; then
tar -xkf $TAR_FILE
else
tar --overwrite -xf $TAR_FILE
echo "Unknown version of tar, please report!"
exit 1
fi
echo " done!"
popd # $DIR
Expand All @@ -34,4 +38,4 @@ unlzma_mv_untar "lib64.tar" "centos7-dev/lib64"
unlzma_mv_untar "debug-lib64.tar" "centos7-dev/debug-lib64"


popd > /dev/null # $BENCHMARK_DIR
popd > /dev/null # $BENCHMARK_DIR