summaryrefslogtreecommitdiff
path: root/testing/docker/common-scripts/ctng-install
blob: 1efd26445725ea9b1b48a4c31f57b9d76f078c2a (plain)
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
#!/bin/bash

set -e
# Mounted directory may already be configured - or may not
# even had bootstrapped.
tar cf - -C / \
        --exclude=crosstool-ng/.build \
        --exclude=crosstool-ng/.build.all \
        --exclude=crosstool-ng/.git \
        --exclude=crosstool-ng/testing/docker \
        crosstool-ng | \
    tar xf -
cd crosstool-ng
if [ -r Makefile ]; then
    make distclean
elif [ ! -r configure ]; then
    ./bootstrap
fi
cd ..
cd work
~/crosstool-ng/configure --prefix=/opt/ctng
make
make install
cd ..
rm -rf crosstool-ng