#! /usr/bin/env sh # nixos-config - My current NixOS configuration # # Copyright (C) 2025 Benedikt Peetz # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of my nixos-config. # # You should have received a copy of the License along with this program. # If not, see . mkFile() { t="$1" mkdir --parents "$(dirname "$t")" echo "TEST_FILE" >"$t" } # We need to hard code this, so that our output matches the golden sample. base="/tmp/tmp.DfcgjemfCG" test="$(mktemp --directory -t lf_make_temp_test_XXXXX)" if [ -d "$base" ]; then rm --recursive "$base" fi mkdir "$base" cleanup() { rm --recursive "$base" "$test" } trap cleanup EXIT mkFile "$base/.local/share/file1.txt" mkFile "$base/.local/state/file1.txt" mkFile "$base/.local/nvim/log.LOG" mkFile "$base/.local/.tog/TOG.LOG" mkFile "$base/.config/apzu/file2.txt" mkFile "$base/.config/tiamat/file2.txt" mkFile "$base/.config/lahmu/file2.txt" mkFile "$base/documents/apzu/file2.txt" mkFile "$base/documents/tiamat/file2.txt" mkFile "$base/documents/lahmu/file2.txt" execute_make_maps --home-name "$base" --depth 100 generate "$base/.local" "$base/.config" "$base/documents" >"$test/output.new" diff "$test/output.new" "$(dirname "$LOCATION")/output.old"