Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 15 lines 586 B view raw
1#! /usr/bin/env nix-shell 2#! nix-shell -i bash -p coreutils curl jq common-updater-scripts cargo 3# shellcheck shell=bash 4 5set -euo pipefail 6 7version=$(curl -s https://api.github.com/repos/huacnlee/autocorrect/releases/latest | jq -r .tag_name) 8update-source-version autocorrect "${version#v}" 9 10tmp=$(mktemp -d) 11trap 'rm -rf -- "${tmp}"' EXIT 12 13git clone --depth 1 --branch "${version}" https://github.com/huacnlee/autocorrect.git "${tmp}/autocorrect" 14cargo generate-lockfile --manifest-path "${tmp}/autocorrect/Cargo.toml" 15cp "${tmp}/autocorrect/Cargo.lock" "$(dirname "$0")/Cargo.lock"