Skip to content

Instantly share code, notes, and snippets.

@behrtam
Created November 18, 2015 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save behrtam/6c2cad53e8c040d570b0 to your computer and use it in GitHub Desktop.
Save behrtam/6c2cad53e8c040d570b0 to your computer and use it in GitHub Desktop.
#!/bin/sh
BVG_CLI_CLIENT_URL="https://raw.githubusercontent.com/behrtam/bvg-cli/master/bvg_cli.py"
BVG_CLI_REQUIREMENTS_URL="https://raw.githubusercontent.com/behrtam/bvg-cli/master/requirements.txt"
echo "BVG CLI – Installation"
cd /usr/local/bin/
rm bvg_cli.py
echo " Downloading needed files."
if [ -z "$(which wget)" ]; then
curl -s -o tmp_bvg_cli_requirements $BVG_CLI_REQUIREMENTS_URL
curl -s -O $BVG_CLI_CLIENT_URL
else
wget -qO tmp_bvg_cli_requirements $BVG_CLI_REQUIREMENTS_URL
wget -qO bvg_cli.py $BVG_CLI_CLIENT_URL
fi
echo " Installing needed packages."
pip install -q -r tmp_bvg_cli_requirements
rm tmp_bvg_cli_requirements
chmod u+x bvg_cli.py
echo " Process almost finished."
echo ""
echo "Add an alias to your \"~/.bashrc\" or \"~/.bash_profile\":"
echo "$ echo 'alias bvg-cli=\"python `pwd`/bvg_cli.py\"' >> ~/.bash_profile"
echo "$ source ./bash_profile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment