sh-elf-binutils/install.sh

25 lines
474 B
Bash
Raw Normal View History

2021-01-01 23:22:19 +01:00
#! /usr/bin/env bash
2021-01-07 18:31:52 +01:00
# Avoid rebuilds of the same version
[[ ! -d build ]] && exit 0
2021-01-01 23:22:19 +01:00
source util.sh
2021-01-02 10:37:48 +01:00
PREFIX="$1"
2021-01-01 23:22:19 +01:00
cd build
echo "$TAG Installing to local folder..."
run_quietly giteapc-install.log \
make install-strip
cd ..
# Symbolic link executables to $PREFIX/bin
echo "$TAG Symlinking binaries..."
for x in bin/*; do
2021-01-04 14:10:52 +01:00
ln -sf "$(pwd)/$x" "$PREFIX/$x"
2021-01-01 23:22:19 +01:00
done
# Cleanup build files
echo "$TAG Cleaning up build files..."
rm -rf binutils-*/ binutils-*.tar.*
rm -rf build/