nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 26 lines 761 B view raw
1#!/usr/bin/env nix-shell 2#!nix-shell -i bash -p curl jq common-updater-scripts 3 4set -euo pipefail 5 6# URL to check for the latest version 7latestUrl="https://dl.todesktop.com/210203cqcj00tw1/linux/deb/x64" 8 9# Fetch the latest version information 10latestInfo=$(curl -sI -X GET $latestUrl | grep -oP 'morgen-\K\d+(\.\d+)*(?=[^\d])') 11 12if [[ -z "$latestInfo" ]]; then 13 echo "Could not find the latest version number." 14 exit 1 15fi 16 17# Extract the version number 18latestVersion=$(echo "$latestInfo" | head -n 1) 19 20echo "Latest version of Morgen is $latestVersion" 21 22# Update the package definition 23update-source-version morgen "$latestVersion" 24 25# Fetch and update the hash 26nix-prefetch-url "https://dl.todesktop.com/210203cqcj00tw1/versions/${latestVersion}/linux/deb"