Skip to content
Snippets Groups Projects
Commit f5ae384d authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

bootstrap_upip.sh: Allow to install into a path given by argument.

parent 84d11b5e
Branches
No related tags found
No related merge requests found
# This script performs bootstrap installation of upip package manager from PyPI # This script performs bootstrap installation of upip package manager from PyPI
# All the other packages can be installed using it. # 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 if [ -z "$TMPDIR" ]; then
cd /tmp cd /tmp
else else
...@@ -12,8 +20,11 @@ rm -rf micropython-upip-* ...@@ -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 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 tar xfz micropython-upip-*.tar.gz
mkdir -p ~/.micropython/lib/ tmpd="$PWD"
cp micropython-upip-*/upip*.py ~/.micropython/lib/
cd "$saved"
mkdir -p "$dest"
cp "$tmpd"/micropython-upip-*/upip*.py "$dest"
echo "upip is installed. To use:" echo "upip is installed. To use:"
echo "micropython -m upip --help" echo "micropython -m upip --help"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment