From: Silvio Rhatto Date: Thu, 24 Jan 2013 15:40:37 +0000 (-0200) Subject: Simplifying module-commit X-Git-Tag: 0.1~74 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=58f208585c18daa787d0429bc7efccbd182e9cd2;p=hydra.git Simplifying module-commit --- 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