From 58f208585c18daa787d0429bc7efccbd182e9cd2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 24 Jan 2013 13:40:37 -0200 Subject: Simplifying module-commit --- share/hydra/module-commit | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'share') diff --git a/share/hydra/module-commit b/share/hydra/module-commit index a4ede8c..db8e935 100755 --- a/share/hydra/module-commit +++ b/share/hydra/module-commit @@ -22,16 +22,11 @@ hydra_config_load MODULE="$1" -if hydra_is_git; then - if pwd | grep -q "/$MODULE/"; then - shift - git commit -a -m "$*" - hydra $HYDRA module-update $MODULE - else - echo "Not inside module $MODULE" - exit 1 - fi +if [ -d "$HYDRA_FOLDER/modules/$MODULE" ]; then + shift + ( cd "$HYDRA_FOLDER/modules/$MODULE" && git commit -a -m "$*" ) + hydra $HYDRA module-update $MODULE else - echo "Not a git repository" + echo "Not such module $MODULE" exit 1 fi -- cgit v1.2.3