aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2018-07-04 08:11:06 -0700
committerBrian Dolbec <dolsen@gentoo.org>2018-07-06 22:22:14 -0700
commit3fb36c4ca353adffd39f40cda2e16969e099c3c1 (patch)
treee5f29eaecaf00bb27c3022fc31cfb3b5c5d50d91 /gkeys-ldap
parentgkeys actions.py: Exit smoothly if fetch failed to get a new file (diff)
downloadgentoo-keys-3fb36c4ca353adffd39f40cda2e16969e099c3c1.tar.gz
gentoo-keys-3fb36c4ca353adffd39f40cda2e16969e099c3c1.tar.bz2
gentoo-keys-3fb36c4ca353adffd39f40cda2e16969e099c3c1.zip
gkeys-ldap updateseeds.sh: Add a force override option
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'gkeys-ldap')
-rwxr-xr-xgkeys-ldap/bin/update-seeds.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/gkeys-ldap/bin/update-seeds.sh b/gkeys-ldap/bin/update-seeds.sh
index d241cda..a2e0f87 100755
--- a/gkeys-ldap/bin/update-seeds.sh
+++ b/gkeys-ldap/bin/update-seeds.sh
@@ -1,6 +1,9 @@
#!/bin/sh
# $Id: update-seeds.sh,v 0.2.1 2014/10/12 dolsen Exp $
+FORCE=${1}
+HAS_UPDATES=false
+
# configuration to run from a checkout with a custom config
cwd=$(pwd)
source ${cwd}/update-seeds.conf
@@ -46,6 +49,9 @@ gkeys-ldap update-seeds -C gentoo-devs || die "Seed file generation failed... ab
echo " *** Checking if seed files are up-to-date"
if ! diff -q ${GKEYS_DIR}/${GKEYS_SEEDS} ${GKEY_SEEDS_DIR}/${GKEY_SEEDS} > /dev/null ;then
+ HAS_UPDATES=true
+fi
+if [[ "${FORCE}" == "force" || ${HAS_UPDATES} ]] ; then
echo " *** Spotted differences"
echo " *** Updating old seeds with a new one"
# copy seeds to gkey-seeds