diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index fedacfc..c826754 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -6,24 +6,11 @@ set -eu -# Download file and return filename -function download () { - [[ $# == 0 ]] && exit 1 - - local url="$1" - local suffix="${2:-"${url##*.}"}" - local filename="$(mktemp -t "download-XXXXXX.${suffix}")" - - curl --location --output "${filename}" -# "${url}" - - echo "${filename}" -} - -export -f download - # Directory to look for bootstrap executables in BOOTSTRAP_D="${BASH_SOURCE[0]}.d" +export BOOTSTRAP_LIB="$BOOTSTRAP_D/lib" + if [[ ! -d "$BOOTSTRAP_D" ]]; then echo "Error: bootstrap directory '$BOOTSTRAP_D' not found" >&2 exit 1 diff --git a/.config/yadm/bootstrap.d/install-helix b/.config/yadm/bootstrap.d/install-helix index 2af8de2..a57e245 100755 --- a/.config/yadm/bootstrap.d/install-helix +++ b/.config/yadm/bootstrap.d/install-helix @@ -2,6 +2,8 @@ set -eu +source "${BOOTSTRAP_LIB}/helpers" + APPS_DIR="${HOME}/apps" VERSION="22.05" diff --git a/.config/yadm/bootstrap.d/install-kitty b/.config/yadm/bootstrap.d/install-kitty index 5aec9f9..5b5d56f 100755 --- a/.config/yadm/bootstrap.d/install-kitty +++ b/.config/yadm/bootstrap.d/install-kitty @@ -2,6 +2,8 @@ set -eu +source "${BOOTSTRAP_LIB}/helpers" + APPS_DIR="${HOME}/apps" VERSION="0.25.2" diff --git a/.config/yadm/bootstrap.d/install-starship b/.config/yadm/bootstrap.d/install-starship index e231e15..2fe668a 100755 --- a/.config/yadm/bootstrap.d/install-starship +++ b/.config/yadm/bootstrap.d/install-starship @@ -2,6 +2,8 @@ set -eu +source "${BOOTSTRAP_LIB}/helpers" + VERSION="1.9.1" INSTALL_DIR="${HOME}/.local/bin" INSTALLED_VERSION=""