Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
executable file 27 lines (22 sloc) 926 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"
echo
case "$(uname -s)" in
Linux)
sudo curl -sLo "/usr/share/bash-completion/completions/particle" "$COMPLETION_URL"
echo "Installed in /usr/share/bash-completion/completions";;
*)
mkdir -p "$HOME/.bash_completion"
curl -sLo "$HOME/.bash_completion/particle" "$COMPLETION_URL"
echo "source $HOME/.bash_completion/particle" >> "$HOME/.profile"
echo "Installed in ~/.bash_completion, sourced in ~/.profile";;
esac
echo "Please open a new terminal to use particle-cli-completion"
echo