aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2018-11-19 12:24:26 +0100
committerOliver Smith <osmith@sysmocom.de>2018-11-21 14:37:49 +0100
commit896c7a8c4958870f0ca600a60c14d52ac49a67f0 (patch)
tree606ad288ad4d3376c53d0684c22188256243586d
parent54e6529a6ab87b28820b612f9bd37b7c9c02863c (diff)
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
-rwxr-xr-xbuild/vty_reference_combine.sh8
1 files changed, 8 insertions, 0 deletions
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" \