This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / tools / boosteroid / update.sh
627 B 24 lines
1#!/usr/bin/env bash 2set -euo pipefail 3 4url="https://boosteroid.com/linux/installer/boosteroid_portable.tar" 5# Run by update-pkgs from the flake root ($0 is a read-only store copy). 6pkg=tools/boosteroid/package.nix 7 8old_hash=$(grep -oP 'hash = "\K[^"]+' "$pkg") 9 10tmpfile=$(mktemp) 11trap 'rm -f "$tmpfile"' EXIT 12 13curl -fsSL -A "Mozilla/5.0" -o "$tmpfile" "$url" 14new_hash=$(nix hash file --sri "$tmpfile") 15 16if [ "$old_hash" = "$new_hash" ]; then 17 echo "boosteroid: already up to date ($old_hash)" 18 exit 0 19fi 20 21echo "boosteroid: updating hash" 22echo " old: $old_hash" 23echo " new: $new_hash" 24sed -i "s|$old_hash|$new_hash|" "$pkg"