summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydra/init2
-rwxr-xr-xshare/hydra/sync20
2 files changed, 13 insertions, 9 deletions
diff --git a/share/hydra/init b/share/hydra/init
index 2920af4..161c723 100755
--- a/share/hydra/init
+++ b/share/hydra/init
@@ -49,7 +49,7 @@ if [ ! -z "$REMOTE" ]; then
# Initialize only the required repositories
for repo in $BASEREPOS; do
- if [ -e '.gitmodules' ] && grep -q \"config\" .gitmodules; then
+ if [ -e '.gitmodules' ] && grep -q \"$repo\" .gitmodules; then
git submodule update --init $repo
else
REMOTE="`echo $REMOTE | sed -e 's|/$||'`"
diff --git a/share/hydra/sync b/share/hydra/sync
index 3727c8e..bed3e4f 100755
--- a/share/hydra/sync
+++ b/share/hydra/sync
@@ -82,13 +82,17 @@ hydra_sync $REPOSITORIES
# Update keyring.
if [ "$UPDATE_KEYRINGER" != "no" ]; then
- if ! which keyringer &> /dev/null; then
- hydra_install_package keyringer
- elif [ ! -e "$HOME/.keyringer/$HYDRA" ]; then
- echo "Initializing keyring for $HYDRA..."
- keyringer $HYDRA init $HYDRA_FOLDER/$repository
- fi
+ if [ ! -e "$HOME/.keyringer/$HYDRA" ]; then
+ if [ -e "$HYDRA_FOLDER/keyring" ]; then
+ if ! which keyringer &> /dev/null; then
+ hydra_install_package keyringer
+ fi
+
+ echo "Initializing keyring for $HYDRA..."
+ keyringer $HYDRA init $HYDRA_FOLDER/keyring
- echo "Syncing keyringer..."
- keyringer $HYDRA git pull
+ echo "Syncing keyringer..."
+ keyringer $HYDRA git pull
+ fi
+ fi
fi