Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 28 lines (22 sloc) 910 Bytes
#!/bin/bash
# ------------------------------------- #
# particle-cli-completion #
# Made by Nathan Robinson #
# @nrobinson2000 #
# File: install #
# Desc: Install particle-cli-completion #
# ------------------------------------- #
COMPLETION_URL="https://raw.githubusercontent.com/nrobinson2000/particle-cli-completion/master/particle-cli"
echo
case "$(uname -s)" in
Linux)
sudo curl -sLo "/etc/bash_completion.d/particle-cli" "$COMPLETION_URL"
echo "Installed in /etc/bash_completion.d";;
*)
mkdir -p "$HOME/.bash_completion"
curl -sLo "$HOME/.bash_completion/particle-cli" "$COMPLETION_URL"
echo "source $HOME/.bash_completion/particle-cli" >> "$HOME/.profile"
echo "Installed in ~/.bash_completion, sourced in ~/.profile";;
esac
echo "Please open a new terminal to use particle-cli-completion"
echo