#!/bin/awk -f # SPDX-License-Identifier: EUPL-1.2+ # SPDX-FileCopyrightText: 2021, 2023 Alyssa Ross function to_uuid(hex) { return substr(hex, 1, 8) "-" substr(hex, 9, 4) "-" substr(hex, 13, 4) "-" \ substr(hex, 17, 4) "-" substr(hex, 21) } BEGIN { if (length(ENVIRON["roothash"]) != 64) { system("echo 'roothash invalid or missing' >&2") exit 1 } print to_uuid(substr(ENVIRON["roothash"], 1, 32)) print to_uuid(substr(ENVIRON["roothash"], 33, 32)) }