Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. set -e
  4.  
  5. BINUTILS_FOLDER=binutils-$BINUTILS_VERSION
  6. BINUTILS_FILE=$BINUTILS_FOLDER.tar.gz
  7.  
  8. download() {
  9. wget -c $DOWNLOAD_SERVER/binutils/$BINUTILS_FILE
  10. }
  11.  
  12. extract() {
  13. tar -x -f $BINUTILS_FILE
  14. }
  15.  
  16. build() {
  17. mkdir -p build-$BINUTILS_FOLDER
  18. cd build-$BINUTILS_FOLDER
  19. if [ ! -f .configured ]; then
  20. rm -rf ./*
  21. ../$BINUTILS_FOLDER/configure --target=$TARGET --prefix="$INSTALLATION_FOLDER" $BINUTILS_OPTIONS
  22. # touch .configured
  23. # fi
  24. # if [ ! -f .made ]; then
  25. make -j4
  26. # touch .made
  27. # fi
  28. # if [ ! -f .installed ]; then
  29. make install
  30. # touch .installed
  31. touch .configured # TODO: Remove
  32. fi
  33. cd ..
  34. }
  35.  
  36. clean() {
  37. rm -rf $BINUTILS_FOLDER build-$BINUTILS_FOLDER $BINUTILS_FILE
  38. }
  39.  
  40. download
  41. extract
  42. build
  43. clean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement