1 parent 84d11b5 commit f5ae384Copy full SHA for f5ae384
1 file changed
tools/bootstrap_upip.sh
@@ -1,6 +1,14 @@
1
# This script performs bootstrap installation of upip package manager from PyPI
2
# All the other packages can be installed using it.
3
4
+saved="$PWD"
5
+
6
+if [ "$1" = "" ]; then
7
+ dest=~/.micropython/lib/
8
+else
9
+ dest="$1"
10
+fi
11
12
if [ -z "$TMPDIR" ]; then
13
cd /tmp
14
else
@@ -12,8 +20,11 @@ rm -rf micropython-upip-*
20
wget -nd -r -l1 https://pypi.python.org/pypi/micropython-upip/ --accept-regex ".*pypi.python.org/packages/source/.*.gz" --reject=html
21
22
tar xfz micropython-upip-*.tar.gz
15
-mkdir -p ~/.micropython/lib/
16
-cp micropython-upip-*/upip*.py ~/.micropython/lib/
23
+tmpd="$PWD"
24
25
+cd "$saved"
26
+mkdir -p "$dest"
27
+cp "$tmpd"/micropython-upip-*/upip*.py "$dest"
17
28
18
29
echo "upip is installed. To use:"
19
30
echo "micropython -m upip --help"
0 commit comments