From 1d896f653996020b6a12ea59c673c30b88648136 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Thu, 4 Jul 2024 20:00:05 -0700 Subject: [PATCH] finish up bootstrap codepath in update script also use self-hosted URL for the tar file --- update | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/update b/update index 6073f65..d1b5730 100755 --- a/update +++ b/update @@ -1,8 +1,10 @@ #!/usr/bin/env sh here="$(readlink -f "$0")" && here="${here%/*}" && CDPATH= cd "$here" || exit -#remote="https://github.com/notwa/rc/archive/refs/heads/master.tar.gz" -remote="https://github.com/notwa/rc/archive/master.tar.gz" -#remote="https://eaguru.guru/git/notwa/rc/archive/master.tar.gz" +#remote="https://github.com/notwa/rc/archive/master.tar.gz" +remote="https://eaguru.guru/git/notwa/rc/archive/master.tar.gz" + +# NOTE: this script only updates files in subdirectories. +# it does not update itself! warn() { printf >&2 %s\\n "$*" @@ -26,7 +28,8 @@ die() { backup="backup-$(date -u +%s)" || die 'failed to determine date' -# load libraries +# load libraries. +# TODO: write a simple fallback when the library is missing! dummy() { :; } preload=dummy . sh/obtain @@ -36,8 +39,8 @@ __obtain_prep do_clean() { rm dummy; } if ! __obtain_url https://eaguru.guru/t/dummy > dummy; then - __obtain_bootstrap || exit - die 'TODO' + __obtain_bootstrap || die + __obtain_url https://eaguru.guru/t/dummy > dummy || die fi do_clean() { rm dummy dummy.sha256sum; }