forked from innerlee/setup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzzmpfr.sh
More file actions
35 lines (26 loc) · 718 Bytes
/
zzmpfr.sh
File metadata and controls
35 lines (26 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# install mpfr
set -e
ROOTDIR=${ZZROOT:-$HOME/app}
NAME="mpfr"
TYPE=".tar.gz"
FILE="$NAME$TYPE"
DOWNLOADURL="https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.gz"
echo $NAME will be installed in "$ROOTDIR"
echo install gmp first
mkdir -p "$ROOTDIR/downloads"
cd "$ROOTDIR"
if [ -f "downloads/$FILE" ]; then
echo "downloads/$FILE exist"
else
echo "$FILE does not exist, downloading from $DOWNLOADURL"
wget $DOWNLOADURL -O $FILE
mv $FILE downloads/
fi
mkdir -p src/$NAME
tar xf downloads/$FILE -C src/$NAME --strip-components 1
cd src/$NAME
./configure --prefix="$ROOTDIR" --with-gmp="$ROOTDIR"
make -j"$(nproc)" && make check && make install
make check
echo $NAME installed on "$ROOTDIR"