-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup-newlib.sh
More file actions
executable file
·47 lines (39 loc) · 1.17 KB
/
setup-newlib.sh
File metadata and controls
executable file
·47 lines (39 loc) · 1.17 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
set -e
# Confirmation prompt
echo "This script will remove the currently installed autoconf and automake, download and install autoconf-2.69 and automake-1.15.1, and adjust the path variable. sudo will be used. Are you sure?"
read -p "Enter 'yes' to continue: " -r response
if [ "$response" != "yes" ]; then
echo "Aborting..."
exit 1
fi
# Remove autoconf and automake
sudo apt remove autoconf automake
# Download and autoconf-2.69 and automake-1.15.1
echo "Downloading source..."
if [ -x "$(command -v curl)" ]; then
curl -s -O https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
curl -s -O https://ftp.gnu.org/gnu/automake/automake-1.15.1.tar.gz
else
wget -q https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
wget -q https://ftp.gnu.org/gnu/automake/automake-1.15.1.tar.gz
fi
# Extract autoconf-2.69 and automake-1.15.1
echo "Extracting source..."
tar -xzf autoconf-2.69.tar.gz
tar -xzf automake-1.15.1.tar.gz
# Build and install autoconf-2.69 and automake-1.15.1
echo "Compiling source..."
cd autoconf-2.69
./configure
make
sudo make install
cd ..
cd automake-1.15.1
./configure
make
sudo make install
cd ..
# Set path variable
PATH=$PATH:/usr/local/bin
echo "Done!"