You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
739 B
26 lines
739 B
10 years ago
|
#!/bin/bash
|
||
|
set -x
|
||
|
set -e
|
||
|
|
||
|
# This script fetches the revision of the 'facebook-clang-plugins'
|
||
|
# required by Infer.
|
||
|
|
||
|
INFER_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||
|
PLUGIN_REPO=https://github.com/facebook/facebook-clang-plugins
|
||
|
PLUGIN_DIR="$INFER_ROOT/../facebook-clang-plugin"
|
||
|
VERSION_FILE="$INFER_ROOT/dependencies/clang-plugin/clang-plugin-version.config"
|
||
|
|
||
|
# check if the repo is already in place
|
||
|
if [ ! -e "$PLUGIN_DIR" ]; then
|
||
|
echo "$PLUGIN_DIR not found, cloning..."
|
||
|
git $GIT_OPTIONS clone $PLUGIN_REPO "$PLUGIN_DIR"
|
||
|
fi
|
||
|
|
||
|
# update revision if needed
|
||
|
echo "Checking out the right version of the clang plugin..."
|
||
|
pushd $PLUGIN_DIR
|
||
|
git checkout master
|
||
|
git $GIT_OPTIONS pull
|
||
|
git checkout $(cat "$VERSION_FILE")
|
||
|
popd
|