-
Notifications
You must be signed in to change notification settings - Fork 4
/
install
33 lines (26 loc) · 898 Bytes
/
install
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
#!/usr/bin/env bash
#
# This script installs to /usr/local only
# To install, run
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/sschmid/bee/main/install)"
set -e
LOCAL_REPO=/usr/local/opt/bee
REPO=https://github.com/sschmid/bee
if [[ -d "${LOCAL_REPO}" ]]; then
echo "It seems like bee is already installed at ${LOCAL_REPO}"
echo "Run 'bee update' to update bee to the latest version"
else
git clone "${REPO}" "${LOCAL_REPO}"
echo "Linking ${LOCAL_REPO}/src/bee to /usr/local/bin/bee"
mkdir -p /usr/local/bin
ln -s "${LOCAL_REPO}/src/bee" /usr/local/bin/bee
cat << 'EOF'
Please enable bee bash completion to enjoy the best bee experience:
echo "complete -C bee bee" >> ~/.bashrc
For zsh add this:
echo "autoload bashcompinit" >> ~/.zshrc
echo "bashcompinit" >> ~/.zshrc
echo "complete -C bee bee" >> ~/.zshrc
🐝 bee has been installed successfully
EOF
fi