install-linux

 1#!/usr/bin/env bash
 2
 3set -euxo pipefail
 4
 5if [[ $# -gt 0 ]]; then
 6  echo "
 7  Usage: ${0##*/}
 8  Builds and installs zed onto your system into ~/.local, making it available as ~/.local/bin/zed.
 9
10  Before running this you should ensure you have all the build dependencies installed with `./script/linux`.
11  "
12  exit 1
13fi
14export ZED_CHANNEL=$(<crates/zed/RELEASE_CHANNEL)
15export ZED_UPDATE_EXPLANATION="You need to fetch and rebuild zed in $(pwd)"
16script/bundle-linux
17
18arch="$(uname -m)"
19commit=$(git rev-parse HEAD | cut -c 1-7)
20archive="zed-linux-${arch}.tar.gz"
21export ZED_BUNDLE_PATH="${CARGO_TARGET_DIR:-target}/release/${archive}"
22script/install.sh