aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/sync11
1 files changed, 8 insertions, 3 deletions
diff --git a/share/hydra/sync b/share/hydra/sync
index 6fd8d19..873694e 100755
--- a/share/hydra/sync
+++ b/share/hydra/sync
@@ -26,6 +26,11 @@ else
UPDATE_KEYRINGER="no"
fi
+# Check for requirements.
+for req in git-annex; do
+ hydra_install_package $req
+done
+
# Sync each repository.
# TODO: split between public and private repositories
for repository in $REPOSITORIES; do
@@ -37,8 +42,9 @@ for repository in $REPOSITORIES; do
if [ ! -d "$HYDRA_FOLDER/$repository/.git" ]; then
git clone $PRIVATE_REPOS/$repository $HYDRA_FOLDER/$repository
- # TODO: check if keyringer is installed
- if [ ! -e "$HOME/.keyringer/$HYDRA" ]; then
+ if ! which keyringer &> /dev/null; then
+ echo "Please install keyringer for a full hydra experience."
+ elif [ ! -e "$HOME/.keyringer/$HYDRA" ]; then
echo "Initializing keyring for $HYDRA..."
keyringer $HYDRA init $HYDRA_FOLDER/$repository
fi
@@ -47,7 +53,6 @@ for repository in $REPOSITORIES; do
if [ -d "$HYDRA_FOLDER/$repository/.git" ]; then
echo "Syncing $repository..."
- # TODO: check if git-annex is installed
if [ "$repository" == "bootless" ]; then
( cd $HYDRA_FOLDER/$repository && git annex sync )
else