From 896c7a8c4958870f0ca600a60c14d52ac49a67f0 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 19 Nov 2018 12:24:26 +0100 Subject: vty_reference_combine.sh: chmod xsltproc output Force the xsltproc output file to be writable, if it exists already. This is needed for 'make distcheck': xsltproc gives output files the same permissions as input files. We need to change the output file in multiple iterations in vty_reference_combine.sh, hence it must be writable. (moving manuals to project repositories 15/19) Related: OS#3385 Change-Id: I693e12ee15665d01cbc50187e6cb3ca74ad0356a --- build/vty_reference_combine.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/vty_reference_combine.sh b/build/vty_reference_combine.sh index cb18e9e..449b227 100755 --- a/build/vty_reference_combine.sh +++ b/build/vty_reference_combine.sh @@ -22,6 +22,14 @@ cp $reference "$combined" while [ -n "$1" ]; do addition="$(realpath "$1")" shift + + # Fix permissions: xsltproc sets the output permissions the same as the + # input file, which means during "make distcheck" our output file will + # become read-only. + if [ -f "$combine_src" ]; then + chmod 644 "$combine_src" + fi + mv "$combined" "$combine_src" xsltproc -o "$combined" \ --stringparam with "$addition" \ -- cgit v1.2.3