diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-24 13:40:37 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-24 13:40:37 -0200 |
commit | 58f208585c18daa787d0429bc7efccbd182e9cd2 (patch) | |
tree | a70caea6a602f707fd983d68f351e3fb8d7ba0f6 | |
parent | ca5603fa17c28558254e166a9a382c39efc14365 (diff) | |
download | hydra-58f208585c18daa787d0429bc7efccbd182e9cd2.tar.gz hydra-58f208585c18daa787d0429bc7efccbd182e9cd2.tar.bz2 |
Simplifying module-commit
-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 |