linux_6_1: 6.1.117 -> 6.1.118
[NixPkgs.git] / pkgs / tools / system / zram-generator / update.sh
blobbd10e19631a93e578c7e6f8b9f71c2c671e5ac3c
1 #! /usr/bin/env nix-shell
2 #! nix-shell -i bash -p coreutils curl jq common-updater-scripts cargo
3 # shellcheck shell=bash
5 set -euo pipefail
7 version=$(curl -s https://api.github.com/repos/systemd/zram-generator/releases/latest | jq -r .tag_name)
8 update-source-version zram-generator "${version#v}"
10 tmp=$(mktemp -d)
11 trap 'rm -rf -- "${tmp}"' EXIT
13 git clone --depth 1 --branch "${version}" https://github.com/systemd/zram-generator.git "${tmp}/zram-generator"
14 cargo generate-lockfile --manifest-path "${tmp}/zram-generator/Cargo.toml"
15 cp "${tmp}/zram-generator/Cargo.lock" "$(dirname "$0")/Cargo.lock"