mirror of
https://github.com/notwa/rc
synced 2024-11-05 04:19:03 -08:00
22 lines
737 B
Bash
22 lines
737 B
Bash
#!/usr/bin/env sh
|
|
# YES_ZSH
|
|
# YES_BASH
|
|
# YES_DASH
|
|
|
|
# TODO: source pippy here? this may affect dash compatibility.
|
|
|
|
pegg() { ### @-
|
|
### download and (pip) install a Python "egg" from a project on GitHub,
|
|
### defaulting to the master branch. this uses [`pippy`](#pippy) internally.
|
|
###
|
|
### ```sh
|
|
### # install the development version of https://github.com/rthalley/dnspython
|
|
### $ pegg rthalley dnspython
|
|
### # or instead install the latest stable version (as of writing)
|
|
### $ pegg rthalley dnspython 3933b49
|
|
### ```
|
|
[ $# -ge 2 ] || { printf "%s\n" "$0: too few arguments" >&2; return 1; }
|
|
pippy "https://github.com/$1/$2/tarball/${3:-master}#egg=$2"
|
|
}
|
|
|
|
[ "${SOURCING:-0}" -gt 0 ] || pegg "$@"
|