noot
This commit is contained in:
parent
0ee51a946d
commit
2252de5fc4
@ -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
|
||||
usage:
|
||||
repo get <repo-name>
|
||||
EOF
|
||||
esac
|
||||
|
||||
Loading…
Reference in New Issue
Block a user