Browse files

Added compatibility for Mac

  • Loading branch information...
1 parent 6c5660b commit a03944aaa1b5e4d6cb6f570d2319a2979d4390a2 Gabor Szabo committed Aug 2, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1
@@ -48,11 +48,19 @@ fi
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
+ tar=tar
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"
gzip -c <"$temp/pycascading.tar" >"$pycascading_dir/build/pycascading.tgz"
rm -rf "$temp"

0 comments on commit a03944a

Please sign in to comment.