From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- scripts/update_flake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scripts/update_flake (limited to 'scripts/update_flake') diff --git a/scripts/update_flake b/scripts/update_flake new file mode 100755 index 0000000..3a9cd17 --- /dev/null +++ b/scripts/update_flake @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +searched_file="$1" + +get_inputs() { + flake=$1 + name=$2 + cat "$flake" | jq -r --arg name "$name" '.nodes|to_entries[]|select(.value.original.path != null and (.value.original.path|test("(../)+" + $name)))|.key' +} + +find flakes -name "flake.lock" | while read flake; do + for input in $(get_inputs "$flake" "$searched_file"); do + echo "updating $input in $(dirname "$flake")" + pushd "$(dirname "$flake")" >/dev/null 2>/dev/null + nix flake update --update-input "$input" + popd >/dev/null 2>/dev/null + done +done -- cgit v1.2.3