1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2025-02-05 07:43:22 -08:00

finish up bootstrap codepath in update script

also use self-hosted URL for the tar file
This commit is contained in:
Connor Olding 2024-07-04 20:00:05 -07:00
parent b35b92bab2
commit 1d896f6539

15
update
View file

@ -1,8 +1,10 @@
#!/usr/bin/env sh #!/usr/bin/env sh
here="$(readlink -f "$0")" && here="${here%/*}" && CDPATH= cd "$here" || exit 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://github.com/notwa/rc/archive/master.tar.gz" remote="https://eaguru.guru/git/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() { warn() {
printf >&2 %s\\n "$*" printf >&2 %s\\n "$*"
@ -26,7 +28,8 @@ die() {
backup="backup-$(date -u +%s)" || die 'failed to determine date' 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() { :; } dummy() { :; }
preload=dummy preload=dummy
. sh/obtain . sh/obtain
@ -36,8 +39,8 @@ __obtain_prep
do_clean() { rm dummy; } do_clean() { rm dummy; }
if ! __obtain_url https://eaguru.guru/t/dummy > dummy; then if ! __obtain_url https://eaguru.guru/t/dummy > dummy; then
__obtain_bootstrap || exit __obtain_bootstrap || die
die 'TODO' __obtain_url https://eaguru.guru/t/dummy > dummy || die
fi fi
do_clean() { rm dummy dummy.sha256sum; } do_clean() { rm dummy dummy.sha256sum; }