diff options
-rwxr-xr-x | share/hydra/module-commit | 15 |
1 files changed, 5 insertions, 10 deletions
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 |