#!/usr/bin/env bash # USAGE: ./setup.sh install cbuild to /usr/local # ./setup.sh --local install cbuild to $HOME/.local # exit on errors set -xeo pipefail CBUILD_VERSION=$( $installed_bootstrap_version_int ]]; then echo "Found outdated bootstrap.sh in '$CBUILD_INSTALL_DIR', updating" ln -sf "$(realpath $CBUILD_INSTALL_DIR/bootstrap.sh)" -T "$bootstrap_install_path" fi else echo "Not found bootstrap.sh in '$CBUILD_INSTALL_DIR', installing" ln -sf "$(realpath $CBUILD_INSTALL_DIR/bootstrap.sh)" -T "$bootstrap_install_path" fi echo "Link bootstrap.sh to $CBUILD_BIN_DIR" ln -sf "$(realpath $bootstrap_install_path)" -T "$CBUILD_BIN_DIR/cbuild"