diff options
| author | Damien George <damien.p.george@gmail.com> | 2014-08-26 16:03:57 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2014-08-26 16:03:57 +0100 |
| commit | db63660c19c9080d040ad48a5fb2a2ab233b7ede (patch) | |
| tree | 96f7901c195b2ff9a3c35dc14a49df96e794820f /tools | |
| parent | 3bb7efc943062052606d307773841d662ab3b2d5 (diff) | |
Add pip-micropython to unix make install.
Also add -t/--target option to pip-micropython to allowing installing to
the pyboard.
Thanks to turbinenreiter/Sebastian Plamauer for the patch.
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/pip-micropython | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/pip-micropython b/tools/pip-micropython index 0db699f0c..ad55d7ef4 100755 --- a/tools/pip-micropython +++ b/tools/pip-micropython @@ -5,19 +5,34 @@ # complete library snapshot to be deployed on a device for baremetal # ports (if PIP_MICROPY_DEST environment var is set). # +# Currently supported usage: +# +# pip-micropython install [-t/--target <dir>] <packages> +# parse command if [ "$1" != "install" ]; then echo "Only install command is supported currently" exit 1 fi shift +# parse options +targetdest='' +if [ "$1" == "-t" -o "$1" == "--target" ]; then + targetdest="$2" + shift + shift +fi + if [ -z "$TMPDIR" ]; then TMPDIR=/tmp fi TMPVENV="$TMPDIR/pip-micropy-venv" -if [ -n "$PIP_MICROPY_DEST" ]; then +if [ -n "$targetdest" ]; then + dest="$targetdest" + echo "Destination snapshot directory: $dest" +elif [ -n "$PIP_MICROPY_DEST" ]; then dest="$PIP_MICROPY_DEST" echo "Destination snapshot directory: $dest" elif [ -n "$MICROPYPATH" ]; then |
