Files
rk35xx-android14/external/gfxstream-protocols/registry/vulkan/scripts/checkXrefs
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

27 lines
657 B
Bash
Executable File

#!/bin/sh
#
# Copyright 2015-2021 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
# checkXrefs - check internal links in a Vulkan HTML spec
# Usage: checkXrefs file.html
# Prints a list of internal hrefs with no corresponding anchors.
# (There are many anchors with no corresponding hrefs - this is OK).
xrefs=`tempfile`
ids=`tempfile`
sed -e 's/ href="#/\nhref="#/g' < $1 | \
grep 'href="#' | \
sed -e 's/href="#//g' -e 's/"[ >].*//g' | \
sort | uniq > $xrefs
sed -e 's/ id="/\nid="/g' < $1 | \
grep 'id="' | \
sed -e 's/id="//g' -e 's/"[ >].*//g' | \
sort | uniq > $ids
comm -23 $xrefs $ids
rm $xrefs $ids 1>&2