summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-24 13:40:37 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-24 13:40:37 -0200
commit58f208585c18daa787d0429bc7efccbd182e9cd2 (patch)
treea70caea6a602f707fd983d68f351e3fb8d7ba0f6 /share
parentca5603fa17c28558254e166a9a382c39efc14365 (diff)
downloadhydra-58f208585c18daa787d0429bc7efccbd182e9cd2.tar.gz
hydra-58f208585c18daa787d0429bc7efccbd182e9cd2.tar.bz2
Simplifying module-commit
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/module-commit15
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