forked from a/repotool
noot
This commit is contained in:
parent
0ee51a946d
commit
2252de5fc4
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
[[ -z "$REPOTOOL_PATH" ]] && export REPOTOOL_PATH="$HOME/repo"
|
[[ -z "$REPOTOOL_PATH" ]] && export REPOTOOL_PATH="$HOME/repo"
|
||||||
|
|
||||||
|
|
||||||
_activate_hook() {
|
_activate_hook() {
|
||||||
if [[ -f "$REPOTOOL_PATH/.hooks/$1.zsh" ]]; then
|
if [[ -f "$REPOTOOL_PATH/.hooks/$1.zsh" ]]; then
|
||||||
. "$REPOTOOL_PATH/.hooks/$1.zsh" $2
|
. "$REPOTOOL_PATH/.hooks/$1.zsh" $2
|
||||||
@ -17,10 +18,12 @@ _activate_hook() {
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TOOL_BIN="$REPOTOOL_PATH/.bin/repotool"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
get | g)
|
get | g)
|
||||||
shift;
|
shift;
|
||||||
response=$($REPOTOOL_PATH/.bin/repotool get $@)
|
response=$($TOOL_BIN get $@)
|
||||||
if [[ $? != 0 ]] then;
|
if [[ $? != 0 ]] then;
|
||||||
echo "failed to get repo with args $@"
|
echo "failed to get repo with args $@"
|
||||||
return $?
|
return $?
|
||||||
@ -36,4 +39,8 @@ case "$1" in
|
|||||||
_activate_hook "after_cd" $response
|
_activate_hook "after_cd" $response
|
||||||
;;
|
;;
|
||||||
'help' | "-h"| "-help" | "--help")
|
'help' | "-h"| "-help" | "--help")
|
||||||
|
echo <<EOF
|
||||||
|
usage:
|
||||||
|
repo get <repo-name>
|
||||||
|
EOF
|
||||||
esac
|
esac
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user