Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 8a79edb43b
Fetching contributors…

Cannot retrieve contributors at this time

executable file 56 lines (44 sloc) 1.784 kB
# This script fills TARGET_DIR with what should go into
# ~/.meteor/tools/VERSION
# It does not set up the top-level springboard file in
# ~/.meteor/tools or the ~/.meteor/meteor symlink.
cd `dirname $0`/../..
if [ "$TARGET_DIR" == "" ] ; then
echo 'Must set $TARGET_DIR'
exit 1
# Make sure that the entire contents $TARGET_DIR is what we placed
# there
if [ -e "$TARGET_DIR" ] ; then
echo "$TARGET_DIR already exists"
exit 1
echo "Setting up tools tree in $TARGET_DIR"
# make sure dev bundle exists before trying to install
./meteor --version || exit 1
function CPR {
tar -c --exclude .meteor/local "$1" | tar -x -C "$2"
# The tools starts as a copy of the dev bundle.
cp -a dev_bundle "$TARGET_DIR"
# Copy over files and directories that we want in the tarball. Keep this list
# synchronized with the files used in the $TOOLS_VERSION calculation below. The
# "meteor" script file contains the version number of the dev bundle, so we
# include that instead of the (arch-specific) bundle itself in sha calculation.
cp meteor "$TARGET_DIR/bin"
CPR examples "$TARGET_DIR"
# Trim tests and unfinished examples.
rm -rf "$TARGET_DIR"/tools/tests
rm -rf "$TARGET_DIR"/examples/unfinished
rm -rf "$TARGET_DIR"/examples/other
# mark directory with current git sha
git rev-parse HEAD > "$TARGET_DIR/.git_version.txt"
# generate tools version: directory hash that depends only on file
# contents but nothing else, eg modification time
echo -n "Computing tools version... "
TOOLS_VERSION=$(git ls-tree HEAD LICENSE.txt meteor tools examples | shasum | cut -f 1 -d " ") # shasum's output looks like: 'SHA -'
echo -n "$TOOLS_VERSION" > "$TARGET_DIR/.tools_version.txt"
Jump to Line
Something went wrong with that request. Please try again.