File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 55# complete library snapshot to be deployed on a device for baremetal
66# ports (if PIP_MICROPY_DEST environment var is set).
77#
8+ # Currently supported usage:
9+ #
10+ # pip-micropython install [-t/--target <dir>] <packages>
811
12+ # parse command
913if [ " $1 " != " install" ]; then
1014 echo " Only install command is supported currently"
1115 exit 1
1216fi
1317shift
1418
19+ # parse options
20+ targetdest=' '
21+ if [ " $1 " == " -t" -o " $1 " == " --target" ]; then
22+ targetdest=" $2 "
23+ shift
24+ shift
25+ fi
26+
1527if [ -z " $TMPDIR " ]; then
1628 TMPDIR=/tmp
1729fi
1830TMPVENV=" $TMPDIR /pip-micropy-venv"
1931
20- if [ -n " $PIP_MICROPY_DEST " ]; then
32+ if [ -n " $targetdest " ]; then
33+ dest=" $targetdest "
34+ echo " Destination snapshot directory: $dest "
35+ elif [ -n " $PIP_MICROPY_DEST " ]; then
2136 dest=" $PIP_MICROPY_DEST "
2237 echo " Destination snapshot directory: $dest "
2338elif [ -n " $MICROPYPATH " ]; then
Original file line number Diff line number Diff line change @@ -106,10 +106,14 @@ test: $(PROG) ../tests/run-tests
106106TARGET = micropython
107107PREFIX = $(DESTDIR ) /usr/local
108108BINDIR = $(PREFIX ) /bin
109+ PIPSRC = ../tools/pip-micropython
110+ PIPTARGET = pip-micropython
109111
110112install : micropython
111113 install -D $(TARGET ) $(BINDIR ) /$(TARGET )
114+ install -D $(PIPSRC ) $(BINDIR ) /$(PIPTARGET )
112115
113116# uninstall micropython
114117uninstall :
115118 -rm $(BINDIR ) /$(TARGET )
119+ -rm $(BINDIR ) /$(PIPTARGET )
You can’t perform that action at this time.
0 commit comments