mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
Merge pull request #219124 from doronbehar/pkg/nerdfonts
nerdfonts: add update.sh script to passthru
This commit is contained in:
commit
9fc7d2ca0b
@ -59,6 +59,7 @@ stdenv.mkDerivation rec {
|
||||
rm -rfv $out/share/fonts/truetype/NerdFonts/*Windows\ Compatible.*
|
||||
''}
|
||||
'';
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts";
|
||||
|
@ -5,9 +5,14 @@ latest_release=$(curl --silent https://api.github.com/repos/ryanoasis/nerd-fonts
|
||||
version=$(jq -r '.tag_name' <<<"$latest_release")
|
||||
|
||||
dirname="$(dirname "$0")"
|
||||
echo \""${version#v}"\" >"$dirname/version.nix"
|
||||
|
||||
echo Using version "$version"
|
||||
echo \""${version#v}"\" >"$dirname/version-new.nix"
|
||||
if diff -q "$dirname/version-new.nix" "$dirname/version.nix"; then
|
||||
echo No new version available, current: $version
|
||||
exit 0
|
||||
else
|
||||
echo Updated to version "$version"
|
||||
mv "$dirname/version-new.nix" "$dirname/version.nix"
|
||||
fi
|
||||
|
||||
printf '{\n' > "$dirname/shas.nix"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user