File: setup-devenv.sh

package info (click to toggle)
opentelemetry-cpp 1.23.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,372 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 36; python: 31
file content (32 lines) | stat: -rwxr-xr-x 918 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
set -e

# Try to autodetect the tools dir
if [ "$BASH_SOURCE" != "" ]; then
TOOLS_PATH=`dirname ${BASH_SOURCE[0]}`
else
TOOLS_PATH=`pwd`/tools
fi
echo "Tools directory: $TOOLS_PATH"

# Install build tools if not installed yet
FILE=.buildtools
OS_NAME=`uname -a`
if [ ! -f $FILE ]; then
case "$OS_NAME" in
 *Darwin*) tools/setup-buildtools-mac.sh ;;
 *Linux*)  [[ -z "$NOROOT" ]] && sudo $TOOLS_PATH/setup-buildtools.sh || echo "No root: skipping build tools installation." ;;
 *)        echo "WARNING: unsupported OS $OS_NAME , skipping build tools installation.."
esac
# Assume that the build tools have been successfully installed
echo > $FILE
else
echo Build tools have been already installed, skipping installation.
fi

# Configure git aliases for current session
export PATH=$TOOLS_PATH:$PATH
git config alias.cl '!git-cl.sh'