diff --git a/repotool.zsh b/repotool.zsh index 46ab5ba..6f1262a 100755 --- a/repotool.zsh +++ b/repotool.zsh @@ -2,6 +2,7 @@ [[ -z "$REPOTOOL_PATH" ]] && export REPOTOOL_PATH="$HOME/repo" + _activate_hook() { if [[ -f "$REPOTOOL_PATH/.hooks/$1.zsh" ]]; then . "$REPOTOOL_PATH/.hooks/$1.zsh" $2 @@ -17,10 +18,12 @@ _activate_hook() { fi return 1 } + +TOOL_BIN="$REPOTOOL_PATH/.bin/repotool" case "$1" in get | g) shift; - response=$($REPOTOOL_PATH/.bin/repotool get $@) + response=$($TOOL_BIN get $@) if [[ $? != 0 ]] then; echo "failed to get repo with args $@" return $? @@ -36,4 +39,8 @@ case "$1" in _activate_hook "after_cd" $response ;; 'help' | "-h"| "-help" | "--help") + echo < +EOF esac