Skip to content

Commit f3c3010

Browse files
committed
pip-micropython: Revert to using PIP_MICROPY_DEST environment var.
-t/--target is a pip option. Trying to use pip options for different meanings in pip-micropython may lead to big confusion. That's why the original passed any extra parameters using environment variables. "All options belong to pip."
1 parent b427d6a commit f3c3010

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

tools/pip-micropython

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,19 @@
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>
118

12-
# parse command
139
if [ "$1" != "install" ]; then
1410
echo "Only install command is supported currently"
1511
exit 1
1612
fi
1713
shift
1814

19-
# parse options
20-
targetdest=''
21-
if [ "$1" == "-t" -o "$1" == "--target" ]; then
22-
targetdest="$2"
23-
shift
24-
shift
25-
fi
26-
2715
if [ -z "$TMPDIR" ]; then
2816
TMPDIR=/tmp
2917
fi
3018
TMPVENV="$TMPDIR/pip-micropy-venv"
3119

32-
if [ -n "$targetdest" ]; then
33-
dest="$targetdest"
34-
echo "Destination snapshot directory: $dest"
35-
elif [ -n "$PIP_MICROPY_DEST" ]; then
20+
if [ -n "$PIP_MICROPY_DEST" ]; then
3621
dest="$PIP_MICROPY_DEST"
3722
echo "Destination snapshot directory: $dest"
3823
elif [ -n "$MICROPYPATH" ]; then

0 commit comments

Comments
 (0)