Fix syntax errors
[gitolite-hooks.git] / slack
diff --git a/slack b/slack
old mode 100644 (file)
new mode 100755 (executable)
index 45187cf..a8055eb
--- a/slack
+++ b/slack
@@ -8,7 +8,7 @@
 # Based on post-receive.irc by Mikael Fridh <frimik@gmail.com> https://gist.github.com/1821358
 #
 
-function help() {
+function help_slack() {
   echo "Required config settings:"
   echo " git config hooks.slack.webhook-url 'https://hooks.slack.com/services/...'"
   echo " git config hooks.slack.channel 'general'"
@@ -233,16 +233,3 @@ function notify_slack() {
       "$webhook_url" \
       >/dev/null
 }
-
-webhook_url=$(git config --get hooks.slack.webhook-url)
-
-while read line; do
-  set -- $line
-  if [ -n "$webhook_url" ]; then
-      notify_slack $*
-  fi
-
-  RET=$?
-done
-
-exit $RET