blob: 1b635d9d61e77d9d85bd90de0955187dd35509c5 (
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
26
27
|
#!/bin/bash
set -e
# Mounted directory may already be configured. Trying to install from
# such directory would cause a failure in the container due to mismatch in
# command names/paths detected by configure on the host.
if [ -e /crosstool-ng/Makefile \
-o -e /crosstool-ng/.build \
-o -e /crosstool-ng/.build-all \
-o -e /crosstool-ng/config.status ]; then
echo "ERROR :: The host directory must not be configured/built. Run 'git clean -fxd' before" >&2
echo "ERROR :: installing crosstool-NG in the container." >&2
exit 1
fi
tar cf - -C / \
--exclude=crosstool-ng/.git \
--exclude=crosstool-ng/testing/docker \
crosstool-ng | \
tar xf -
cd crosstool-ng
./bootstrap
cd ../work
~/crosstool-ng/configure --prefix=/opt/ctng
make
make install
cd ..
rm -rf crosstool-ng
|