From f1c12a25cbd97a9a0a6e82a221462e9b992e521c Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 14 May 2015 15:24:22 +0200 Subject: fixup: only run apt-get install if they are new packages to be installed --- 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 9322ca48..a5f18e03 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -80,7 +80,7 @@ fi # # install packages we need # -if [ ./$0 -nt $STAMP ] || [ -f $STAMP ] ; then +if [ ./$0 -nt $STAMP ] || [ ! -f $STAMP ] ; then sudo apt-get install \ apache2 \ apt-file \ @@ -330,7 +330,7 @@ cd $BASEDIR KGB_SECRETS="/srv/jenkins/kgb/secrets.yml" if [ -f "$KGB_SECRETS" ] && [ $(stat -c "%a:%U:%G" "$KGB_SECRETS") = "640:jenkins-adm:jenkins-adm" ] ; then # the last condition is to assure the files are owned by the right user/team - if [ "$KGB_SECRETS" -nt $STAMP ] ; then + if [ "$KGB_SECRETS" -nt $STAMP ] || [ ! -f $STAMP ] ; then sudo -u jenkins-adm "./deploy_kgb.py" else echo "kgb-client configuration unchanged, nothing to do." -- cgit v1.2.3-54-g00ecf