Skip to content

Commit a5185a2

Browse files
committed
bin: script to install python 3.4
1 parent f7ce7c0 commit a5185a2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

bin/install-python.sh

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
# This downloads and install python3.4 to the directory passed in
3+
4+
VERSION=3.4.9
5+
DEST=$1
6+
7+
if [ "$DEST" = "" ]; then
8+
echo "Syntax: $0 <install-directory>"
9+
exit 1
10+
fi
11+
12+
if [ -e "$DEST/bin/python3.4" ]; then
13+
echo "Python already installed in $DEST - skipping install"
14+
exit 0
15+
fi
16+
17+
mkdir -p $DEST
18+
19+
cd /tmp
20+
curl https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tar.xz --output Python-${VERSION}.tar.xz --silent
21+
tar Jxf Python-${VERSION}.tar.xz
22+
cd Python-${VERSION}
23+
./configure --prefix=$DEST
24+
make
25+
make install
26+
echo "Python $VERSION installed in $DEST"

0 commit comments

Comments
 (0)