summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-10-22 23:12:45 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-10-22 23:12:45 -0200
commit21eefa012f38be487393ae602a41bcd64b018d34 (patch)
tree0ccaba1cd1c34d9990a4a4401c9b9b7ef93b3314
parent93670f33c76983846686916c84e13258cfcf37fe (diff)
downloadhydra-21eefa012f38be487393ae602a41bcd64b018d34.tar.gz
hydra-21eefa012f38be487393ae602a41bcd64b018d34.tar.bz2
Check git-annex and keyringer installation
-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