mtools: add update script

This commit is contained in:
Michael Adler 2023-03-22 14:19:29 +01:00 committed by Emery Hemingway
parent 5233468f3b
commit dbd2e95148
2 changed files with 10 additions and 0 deletions

View file

@ -18,6 +18,10 @@ stdenv.mkDerivation rec {
doCheck = true;
passthru = {
updateScript = ./update.sh;
};
meta = with lib; {
homepage = "https://www.gnu.org/software/mtools/";
description = "Utilities to access MS-DOS disks";

View file

@ -0,0 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts
set -eu -o pipefail
version="$(curl -s --list-only ftp://ftp.gnu.org/gnu/mtools/ | sed 's/^.*-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' | sort -n | uniq | tail -n1)"
update-source-version mtools "$version"