#!/usr/bin/env bash # .dev-kit installer shim - polyglot bash/HTML # # Usage: curl -sL https://dk.taxcloud.com | bash # (or clone the repo below and opt-in to features progressively) _DK_VERSION="v1.17.0" # Pinned by release.sh - do not edit by hand. _dk_install() { set -euo pipefail local home="${DK_HOME:-$HOME/.dev-kit}" # SSH by default: .dev-kit is private, and SSH reuses the keys most # devs already have. Override with DK_REPO_URL for HTTPS/token auth. local repo_url="${DK_REPO_URL:-git@github.com:FedTax/.dev-kit.git}" if [ -d "$home/.git" ]; then printf "You already have .dev-kit installed. Try 'dk help'\n" return 0 fi printf '\n Installing .dev-kit %s into %s\n Press Ctrl-C within 2s to abort.\n\n' "$_DK_VERSION" "$home" sleep 2 if ! git clone --depth=1 --branch "$_DK_VERSION" "$repo_url" "$home"; then printf '\nClone failed: %s\n' "$repo_url" printf '\n\t%s' '.dev-kit is a private repo; cloning needs credentialed GitHub access.' printf '\n\t%s\n\n' 'See: https://docs.github.com/en/authentication/connecting-to-github-with-ssh' return 1 fi exec "$home/bootstrap.sh" } # ensure full function def was received before executing. _dk_install "$@" || exit $? :<<-HEREDOC HEREDOC