Files
textmate/bin/create_default_bundles_tbz
Allan Odgaard 9711e92897 Only build ‘bl’ if not already built
Also ensure the tbz archive is created atomically.
2013-01-22 08:03:07 +01:00

21 lines
718 B
Bash
Executable File

#!/bin/sh
set -u
builddir="${builddir:-$HOME/build/TextMate}"
bl="$builddir/Applications/bl/bl"
TBZ_DST=$1
BUNDLES_DST="$(mktemp -dt bundles)"
BZIP2_FLAG="-j"
if which -s pbzip2; then
BZIP2_FLAG="--use-compress-prog=pbzip2"
fi
{ [ -x "$bl" ] || ninja "$bl"; } && \
mkdir -p "$BUNDLES_DST/Managed" && \
"$bl" -C "$BUNDLES_DST/Managed" install Apache Bundle\ Development Bundle\ Support C CSS Diff Git HTML Hyperlink\ Helper JavaScript JSON Mail Make Markdown Math Mercurial Objective-C PHP Property\ List Python Ruby SCM Shell\ Script Source SQL Subversion Text TextMate Themes TODO XML && \
gnutar -cf "$TBZ_DST~" "$BZIP2_FLAG" -C "$BUNDLES_DST" "Managed" && \
mv "$TBZ_DST~" "$TBZ_DST"
rm -rf "$BUNDLES_DST"