summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2015-11-12 20:35:17 +0100
committerHolger Levsen <holger@layer-acht.org>2015-11-14 14:23:39 +0100
commit703124fc74c45c31da1fe830175040bd067c8a25 (patch)
tree7be1ecd3ff71a9afc16363ef16981a2b5ee5baf1
parentd66a7fd810be56c54a9b65993986912067c1e69b (diff)
downloadjenkins.debian.net-703124fc74c45c31da1fe830175040bd067c8a25.tar.xz
sudo to jenkins-adm for accessing the generated .yaml files
-rwxr-xr-xupdate_jdn.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index a353c10b..beea9b29 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -388,8 +388,8 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
for metaconfig in *.yaml.py ; do
# there are both python2 and python3 scripts here
./$metaconfig > $TMPFILE
- if ! $(diff ${metaconfig%.py} $TMPFILE > /dev/null) ; then
- cp $TMPFILE ${metaconfig%.py}
+ if ! sudo -u jenkins-adm cmp -s ${metaconfig%.py} - < $TMPFILE ; then
+ sudo -u jenkins-adm tee ${metaconfig%.py} > /dev/null < $TMPFILE
fi
done
rm -f $TMPFILE