Skip to content

Commit 0684529

Browse files
author
PoTe
committed
Turns out doesn't do what I think it did
1 parent c66270e commit 0684529

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

bin/gpm

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,20 @@ case "${1:-"install"}" in
6565
;;
6666
"install")
6767
[[ -f "Godeps" ]] || (echo ">> Godeps file does not exist." && exit 1)
68-
(which go > /dev/null) || ( echo ">> Go is currently not installed or in your PATH" && exit 1)
68+
(which go > /dev/null) ||
69+
( echo ">> Go is currently not installed or in your PATH" && exit 1)
6970
set_dependencies
7071
;;
7172
"help")
7273
usage
7374
;;
7475
*)
75-
(which "gpm-$1" > /dev/null && gpm-$1 $BASH_ARGV) || usage && exit 1
76+
## Support for Plugins: if command is unknown search for a gpm-command executable.
77+
(which "gpm-$1" > /dev/null &&
78+
plugin=$1 &&
79+
shift &&
80+
gpm-$plugin $@ &&
81+
exit
82+
) || usage && exit 1
7683
;;
7784
esac

0 commit comments

Comments
 (0)