1
0
forked from a/repotool
This commit is contained in:
a 2025-05-12 12:09:06 -05:00
parent 0ee51a946d
commit 2252de5fc4
No known key found for this signature in database
GPG Key ID: 2F22877AA4DFDADB

View File

@ -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