blob: e8c3bcf5e3cf28fb3827ead04664914f40a22616 [file] [log] [blame]
#!/usr/bin/env bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -o errexit
set -o nounset
HERE=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
PANTS_VERSION=0.0.17
if ! [[ -e "$HERE/build-support/pantsbuild.pants-$PANTS_VERSION.pex" ]]; then
echo "Building pants.pex @ $PANTS_VERSION"
"$HERE/build-support/pex" \
-v \
--requirement "pantsbuild.pants==$PANTS_VERSION" \
--entry-point pants.bin.pants_exe:main \
-p "$HERE/build-support/pantsbuild.pants-$PANTS_VERSION.pex.tmp"
mv "$HERE/build-support/pantsbuild.pants-$PANTS_VERSION.pex.tmp" "$HERE/build-support/pantsbuild.pants-$PANTS_VERSION.pex" # 2PC
echo "Built pantsbuild.pants-$PANTS_VERSION.pex"
fi
exec "$HERE/build-support/pantsbuild.pants-$PANTS_VERSION.pex" "$@"