From 703124fc74c45c31da1fe830175040bd067c8a25 Mon Sep 17 00:00:00 2001 From: Philip Hands Date: Thu, 12 Nov 2015 20:35:17 +0100 Subject: sudo to jenkins-adm for accessing the generated .yaml files --- update_jdn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'update_jdn.sh') 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 -- cgit v1.2.3-70-g09d2