mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00

This was supposed to be a check to ensure adoc generation was working, but it interferes with the overall check code cleanliness as it leads to jgit dirty errors. The generation of the docs is done as part of the build too, so it is redundant to do them here.
30 lines
1,001 B
Bash
Executable file
30 lines
1,001 B
Bash
Executable file
#!/bin/bash
|
|
###############################################################################
|
|
# Copyright (c) 2025 Kichwa Coders Canada Inc
|
|
#
|
|
# This program and the accompanying materials
|
|
# are made available under the terms of the Eclipse Public License 2.0
|
|
# which accompanies this distribution, and is available at
|
|
# https://www.eclipse.org/legal/epl-2.0/
|
|
#
|
|
# SPDX-License-Identifier: EPL-2.0
|
|
###############################################################################
|
|
|
|
set -e
|
|
|
|
SCRIPT=$( basename "${BASH_SOURCE[0]}" )
|
|
|
|
##
|
|
# Make sure that asciidocs are up to date
|
|
##
|
|
for p in doc/org.eclipse.cdt.doc.user; do
|
|
echo "Ensure adoc files start with expected contents"
|
|
ref_header=$p/adoc-headers.txt
|
|
git ls-files -- $p/**/*.adoc | while read i ; do
|
|
end_line=$(awk '/\/\/ ENDOFHEADER/{ print NR + 1; exit }' $i)
|
|
tmpfile=$(mktemp /tmp/adoc.XXXXXX)
|
|
cat $ref_header > $tmpfile
|
|
tail --lines=+${end_line:=0} $i >> $tmpfile
|
|
mv -f $tmpfile $i
|
|
done
|
|
done
|