summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-05-14 15:24:22 +0200
committerHolger Levsen <holger@layer-acht.org>2015-05-14 15:24:22 +0200
commitf1c12a25cbd97a9a0a6e82a221462e9b992e521c (patch)
tree0135eb13a095ae3d27d3e4e37b1698c5583b6f6e
parent3b0c78d2b69e51805a92ed374c8358df64cb4b3e (diff)
downloadjenkins.debian.net-f1c12a25cbd97a9a0a6e82a221462e9b992e521c.tar.xz
fixup: only run apt-get install if they are new packages to be installed
-rwxr-xr-xupdate_jdn.sh4
1 files changed, 2 insertions, 2 deletions
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."