blob: b65a89d7068ebb85769fe48d3258c52d98289033 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/env bash
set -euo pipefail
export HAB_LICENSE="accept"
hab_target="$1"
# print error message followed by usage and exit
error () {
local message="$1"
echo -e "\nERROR: ${message}\n" >&2
exit 1
}
[[ -n "$hab_target" ]] || error 'no hab target provided'
echo "--- :habicat: Installing latest version of Habitat"
rm -rf /hab
curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | bash -s -- -t "$hab_target"
hab license accept
|