1
0
This repository has been archived on 2025-07-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
orange_kernel/scripts/orc_hash.sh
2025-03-18 09:50:07 +08:00

17 lines
316 B
Bash

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) Meta Platforms, Inc. and affiliates.
set -e
printf '%s' '#define ORC_HASH '
awk '
/^#define ORC_(REG|TYPE)_/ { print }
/^struct orc_entry {$/ { p=1 }
p { print }
/^}/ { p=0 }' |
sha1sum |
cut -d " " -f 1 |
sed 's/\([0-9a-f]\{2\}\)/0x\1,/g'