aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2018-07-07 08:37:26 -0700
committerBrian Dolbec dolsen <dolsen@gentoo.org>2018-08-14 18:03:33 -0700
commitf4e9abe5ea21488a7dcaf9ec629f554679bc4d89 (patch)
treec8291ade5ef6da69db0290581ad03b281e1166c5 /gkeys-ldap
parentgkeys/lock.py: Fix missed import namespace edit (diff)
downloadgentoo-keys-f4e9abe5ea21488a7dcaf9ec629f554679bc4d89.tar.gz
gentoo-keys-f4e9abe5ea21488a7dcaf9ec629f554679bc4d89.tar.bz2
gentoo-keys-f4e9abe5ea21488a7dcaf9ec629f554679bc4d89.zip
gkeys-ldap update-seeds.sh: Fix missed space in command
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'gkeys-ldap')
-rwxr-xr-xgkeys-ldap/bin/update-seeds.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/gkeys-ldap/bin/update-seeds.sh b/gkeys-ldap/bin/update-seeds.sh
index a29de66..171052c 100755
--- a/gkeys-ldap/bin/update-seeds.sh
+++ b/gkeys-ldap/bin/update-seeds.sh
@@ -1,7 +1,14 @@
#!/bin/bash
# $Id: update-seeds.sh,v 0.2.1 2014/10/12 dolsen Exp $
-FORCE=${1}
+set -o pipefail
+
+if [ -z "${1}" ]; then
+ FORCE='NO'
+else
+ FORCE=${1}
+fi
+
HAS_UPDATES=false
# configuration to run from a checkout with a custom config
@@ -49,10 +56,13 @@ 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
+ echo "*** Detected a diff, HAS_UPDATES=true"
+ HAS_UPDATES=true
+elif [[ "${FORCE}" == "force" ]] ; then
HAS_UPDATES=true
fi
-if [[ "${FORCE}" == "force" || "${HAS_UPDATES}" ]] ; then
- echo " *** Spotted differences"
+
+if [[ "${HAS_UPDATES}" ]] ; then
echo " *** Updating old seeds with a new one"
# copy seeds to gkey-seeds
echo " ... cp ${GKEYS_SEEDS} ${API_DIR}/${API_SEEDS}"
@@ -69,7 +79,7 @@ echo "Committing changes to gkey-seeds repo..."
cd "${GKEY_SEEDS_DIR}" || die " *** Failed to change directory... exiting"
git add "${GKEY_SEEDS}" || die " *** Failed to add modified ${GKEYS_SEEDS} file"
git add "${GKEY_SEEDS}.${GKEYS_SIG}" || die " *** Failed to add ${GKEYS_SEEDS}.sig file"
-git commit -S -m"${GKEYS_COMMIT_MSG}" || die " *** Failed to commit updates"
+git commit -S -m "${GKEYS_COMMIT_MSG}" || die " *** Failed to commit updates"
git push --signed origin master || die " *** git push failed"
cd ..