#!/bin/sh # install the heartbeat tools. By default, this will install the hbc # client only. The server is installed when the arg 'server' is passed # to the script. The script will install the heartbeat tools in a python # virtual environment in ~/venvs/hbd. The hbd and hbc commands will be # installed from the wheel and symlinked to ~/bin/hbd and ~/bin/hbc, # respectively. If the virtual environment already exists, it will be # reused. The script will also remove any existing symlinks for hbd and hbc # in ~/bin before creating new ones. # hbd/hbc from wheel and create symlinks for hbd and hbc in ~/bin set -e if [ ! -d ~/venvs/hbd ]; then mkdir -p ~/venvs python3 -m venv ~/venvs/hbd --system-site-packages fi . ~/venvs/hbd/bin/activate pip install 'git+ssh://git@git.wrede.ca/andreas/heartbeat.git' rm -f ~/bin/hbd rm -f ~/bin/hbc ln -sf $(which hbd) ~/bin/hbd ln -sf $(which hbc) ~/bin/hbc