Skip to content
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.

Commit

Permalink
Added compatibility for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabor Szabo committed Aug 2, 2012
1 parent 6c5660b commit a03944a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion add_tgz_to_build.sh
Expand Up @@ -48,11 +48,19 @@ fi
home_dir=$(pwd)
pycascading_dir=$(dirname "$0")

# BSD tar on Mac OS doesn't have the -A option, so we need to use gnutar there.
# On Linux tar should be good.
if which gnutar >/dev/null; then
tar=gnutar
else
tar=tar
fi

temp=$(mktemp -d -t PyCascading-tmp-XXXXXX)
gzip -d <"$pycascading_dir/build/pycascading.tgz" >"$temp/pycascading.tar"
for j in "$@"; do
gzip -d <"$j" >"$temp/archive.tar"
tar -u -f "$temp/pycascading.tar" "$temp/archive.tar"
$tar -A -f "$temp/pycascading.tar" "$temp/archive.tar"
done
gzip -c <"$temp/pycascading.tar" >"$pycascading_dir/build/pycascading.tgz"
rm -rf "$temp"

0 comments on commit a03944a

Please sign in to comment.