forked from telepresenceio/telepresence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·39 lines (31 loc) · 928 Bytes
/
install.sh
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
33
34
35
36
37
38
39
#!/bin/bash
# Install Telepresence binaries in ${PREFIX}/bin and ${PREFIX}/libexec.
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
echo "Installing Telepresence in ${PREFIX}"
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BINDIR="${BINDIR:-${PREFIX}/bin}"
LIBEXECDIR="${LIBEXECDIR:-${PREFIX}/libexec}"
# Setup
BLDDIR=$(mktemp -d)
trap "rm -rf $BLDDIR" EXIT
DIST="${BLDDIR}/dist"
mkdir -p "${DIST}"
# Build/retrieve executables into dist
cd "${SRCDIR}"
python3 packaging/build-telepresence.py "${DIST}/telepresence"
python3 packaging/build-sshuttle.py "${DIST}/sshuttle-telepresence"
# Place binaries
install -d "${BINDIR}"
install \
"${DIST}/telepresence" \
"${BINDIR}"
install -d "${LIBEXECDIR}"
install \
"${DIST}/sshuttle-telepresence" \
"${LIBEXECDIR}"
# Make sure things appear to run
VERSION=$("${BINDIR}/telepresence" --version)
echo "Installed Telepresence ${VERSION}"