Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- set -e
- BINUTILS_FOLDER=binutils-$BINUTILS_VERSION
- BINUTILS_FILE=$BINUTILS_FOLDER.tar.gz
- download() {
- wget -c $DOWNLOAD_SERVER/binutils/$BINUTILS_FILE
- }
- extract() {
- tar -x -f $BINUTILS_FILE
- }
- build() {
- mkdir -p build-$BINUTILS_FOLDER
- cd build-$BINUTILS_FOLDER
- if [ ! -f .configured ]; then
- rm -rf ./*
- ../$BINUTILS_FOLDER/configure --target=$TARGET --prefix="$INSTALLATION_FOLDER" $BINUTILS_OPTIONS
- # touch .configured
- # fi
- # if [ ! -f .made ]; then
- make -j4
- # touch .made
- # fi
- # if [ ! -f .installed ]; then
- make install
- # touch .installed
- touch .configured # TODO: Remove
- fi
- cd ..
- }
- clean() {
- rm -rf $BINUTILS_FOLDER build-$BINUTILS_FOLDER $BINUTILS_FILE
- }
- download
- extract
- build
- clean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement