diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-05-29 22:34:36 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-05-29 22:35:45 +0300 |
commit | f5ae384d4f0ce2a401a57cf4266be3ce70a9c51d (patch) | |
tree | c18d732f5ef016832ea4c67af8ade788755e56d9 | |
parent | 84d11b5e5341a008405f210892543696df963454 (diff) | |
download | micropython-f5ae384d4f0ce2a401a57cf4266be3ce70a9c51d.tar.gz micropython-f5ae384d4f0ce2a401a57cf4266be3ce70a9c51d.zip |
bootstrap_upip.sh: Allow to install into a path given by argument.
-rwxr-xr-x | tools/bootstrap_upip.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/bootstrap_upip.sh b/tools/bootstrap_upip.sh index 35446b9f2d..667d0845a4 100755 --- a/tools/bootstrap_upip.sh +++ b/tools/bootstrap_upip.sh @@ -1,6 +1,14 @@ # This script performs bootstrap installation of upip package manager from PyPI # All the other packages can be installed using it. +saved="$PWD" + +if [ "$1" = "" ]; then + dest=~/.micropython/lib/ +else + dest="$1" +fi + if [ -z "$TMPDIR" ]; then cd /tmp else @@ -12,8 +20,11 @@ rm -rf micropython-upip-* wget -nd -r -l1 https://pypi.python.org/pypi/micropython-upip/ --accept-regex ".*pypi.python.org/packages/source/.*.gz" --reject=html tar xfz micropython-upip-*.tar.gz -mkdir -p ~/.micropython/lib/ -cp micropython-upip-*/upip*.py ~/.micropython/lib/ +tmpd="$PWD" + +cd "$saved" +mkdir -p "$dest" +cp "$tmpd"/micropython-upip-*/upip*.py "$dest" echo "upip is installed. To use:" echo "micropython -m upip --help" |