Files
textmate/bin/create_default_bundles_tbz
Allan Odgaard 2427464f60 Disable tar’s support for extended attributes and resource forks
A problem has been reported where tar will freeze while extracting the default bundles archive to a networked Application Support folder.

From the bug report (Michael Kuron):

File servers tested: SMB on OS X 10.9.3, AFP on OS X 10.9.3, AFP on OS X 10.6.8, SMB on Windows 2008 R2.

Multiple machines tested.

Using ‘gnutar’ from MacPorts does not show the problem.

Setting ‘COPYFILE_DISABLE=1’ before running tar does not show the problem (the workaround used in this commit).
2014-06-28 17:42:23 +02:00

22 lines
542 B
Bash
Executable File

#!/bin/sh
set -u
TBZ_DST=$1
BZIP2_FLAG="-j"
if which -s pbzip2; then
BZIP2_FLAG="--use-compress-prog=pbzip2"
fi
BUNDLES_DST="$(/usr/bin/mktemp -dt bundles)"
trap 'rm -rf "$BUNDLES_DST"' EXIT
builddir="${builddir:-$HOME/build/TextMate}"
bl="$builddir/Applications/bl/bl"
{ [ -x "$bl" ] || ninja "$bl"; } && \
mkdir -p "$BUNDLES_DST/Managed" && \
"$bl" -C "$BUNDLES_DST/Managed" install mandatories defaults && \
/usr/bin/tar --disable-copyfile -cf "$TBZ_DST~" "$BZIP2_FLAG" -C "$BUNDLES_DST" "Managed" && \
mv "$TBZ_DST~" "$TBZ_DST"