[TOOL][SCRIPT][LINUX/UBUNTU] Build Environment Setup Automater Script [TEAM RADIUM]

Should I add repo tool in the script? [BUGGERS STAY AWAY]

  • Yes

    Votes: 3 100.0%
  • No

    Votes: 0 0.0%

  • Total voters
    3
  • Poll closed .
Search This thread

dmp450

Member
Jan 9, 2011
35
4
Saskatoon
NLNP's/Team Radium's Build Environment Setup Automater Script


What does this script do?

This script is made for people who are lazy like me. lol Jokes apart. This script will setup build environment on your PC running any linux distribution. I have tested it on Ubuntu 13.04 but it should work with almost all linux distros.​

Requirements:
  • A good internet connection.
  • A PC with Linux x86/64 Bit Architecture. (64 Bit Preffered)


This is a list of packages that are going to get downloaded.
  • Python
  • JDK
  • GNU Make
  • Git
  • Required Packages for Android Build Environment.
  • Android SDK ADT Bundle

How to use this script?

*NOTE*: These instructions will change as per releases so you have to view version specific posts :)

  • Open terminal.
  • cd ~/<Directory where you have downloaded the script>
  • chmod 775 tr-be-script
  • ./tr-be-script
  • Follow the steps :)

Credits:
  • Me
  • cybojenix
  • My Team! (Team Radium)
  • XxLordxX (Special Thanks)
  • People whom I have missed.
  • All XDians who made guides on [HOW-TO] Setup Build Environment :highfive:

Changelog:
  • 18/07/2013 - v1.0

    - Initial Release
    - Working
  • 19/07/2013 - v2.0

    - Cleaned up some parts
    - Added SDK Support
  • 19/07/2013 - v2.0.1

    - Fixed up git installing errors
  • 19/07/2013 - v2.5

    - Added missing sudo commands (Thanks to @broodplank1337)

Downloads:

Github:
Find this project on github :D
https://github.com/TeamRadium/tr-be-script

This can't possibly work on most distros. The script uses apt-get which is a Debian package manager. This won't work on most distros *unless* they are Debian based.
 

S0AndS0

Senior Member
May 7, 2012
269
77
This script will work with all distros having APT :)

Thank you for the easy to read and run script. This will help greatly when I go fix my laptop's brains again... the trick of downloading Java from commands is very cool; have yet to pull that off myself in a way that can be repeated.

I noted too that ya stated that the machine should be x86 or 64 (64 preferred) though it looks as though much of it might very well run on ARM Linux; some packages might not work but I'll test it :)

Currently I've been doing something similar (scripting installers) but for Linux distributions that run on Android, which work, are ARM dependent and run "native" for the most part. Hit me up if a "mobile development environment installer" excites you :D and I might throw the links in this post ;)

Sent from either my SPH-D700 or myTouch3Gs
Debian Kit/QEMU Linux Install guide for all android devices that I'm writing:
http://xdaforums.com/showthread.php?t=2240397
Now have working Installers for ARM Java 7 JDK + Maptools + jMonkey
 

KillerofJoy

Senior Member
Jul 27, 2013
421
350
Louisville
Worx and on 12.04

I am running Ubuntu through windows wubi with a gnome 3 environment, cario docks, and compiz with a few bits of derbin. It did do a partial upgrade to my distro was a little worried about how it would effect it running through windows 8 but no problems as of yet that I have seen. Thanks man.
 

dstruct2k

Senior Member
Jan 31, 2008
1,253
938
Winnipeg
Google Pixel 4
V2.5

Changelog:
- Added missing sudo commands (Thanks to @broodplank1337)

Downloads:
http://tinyw.in/rdSX

Usage:
cd ~/<DownloadDirectory>
chmod 775 tr-be-script-v2.5
./tr-be-script-v2.5

Github:
https://github.com/TeamRadium/tr-be-script/commit/265553aa4abdbeb9b4a9128ffd29fffcfe6048da

The script won't run at all on Lubuntu 13.04. "/bin/bash^M: bad interpreter: No such file or directory". Strange, because "which bash" says I've got bash at /bin/bash.
attachment.php


I decided to just copy-paste each line of the script into the terminal instead, but then Python failed the make step. Oh well, continued on.
attachment.php


The next problem came when trying to "cd ~/adt-bundle-linux-x86_64-20130522/tools" : "No such file or directory". I looked in the zip, and the error is correct; that folder doesn't exist. Guess I can't ./configure then...

The only parts of the script that actually worked as expected were installing Java (had to run the commands twice, because for some reason it failed the first time) and apt-get'ting the standard build tools.


Guess I'm not building Android any time soon.
 

Attachments

  • 1.jpg
    1.jpg
    21.8 KB · Views: 818
  • 2.jpg
    2.jpg
    69.2 KB · Views: 816

dstruct2k

Senior Member
Jan 31, 2008
1,253
938
Winnipeg
Google Pixel 4
Sorry about that, gonna fix in next release

thanks for pointing the damn thing out :)
Couple suggestions:
  • Having to press Enter at random intervals throughout the script is mildly annoying, especially when some of the downloads are quite large. Maybe remove those pauses, ask the 32/64 question right at the start, and redirect the output of everything (using ">>") to a (timestamped?) logfile instead?
  • "rm" can't remove folders without the " -r -f" switches to wipe the stuff at the end. ;)
 
Last edited:
  • Like
Reactions: nolinuxnoparty

daggerxXxsin

Senior Member
Aug 11, 2011
296
36
Manila
The script won't run at all on Lubuntu 13.04. "/bin/bash^M: bad interpreter: No such file or directory". Strange, because "which bash" says I've got bash at /bin/bash.
attachment.php


I decided to just copy-paste each line of the script into the terminal instead, but then Python failed the make step. Oh well, continued on.
attachment.php


The next problem came when trying to "cd ~/adt-bundle-linux-x86_64-20130522/tools" : "No such file or directory". I looked in the zip, and the error is correct; that folder doesn't exist. Guess I can't ./configure then...

The only parts of the script that actually worked as expected were installing Java (had to run the commands twice, because for some reason it failed the first time) and apt-get'ting the standard build tools.


Guess I'm not building Android any time soon.

Exact same issue on Kubuntu 12.10. I resolved the bash^M issue by installing dos2unix and converted the script. It ran for the most part but ran into the same errors as above except java also did not install. I had to install openjdk manually using synaptic.

Sent from my Galaxy Nexus
 
Last edited:

housry23

Senior Member
Sep 23, 2009
2,939
746
Springfield, OH
I know it should work in Linux mint, but has anyone actually used it in mint? Thanks! I'll keep this handy on an external hard drive because I like fresh OS installs every once in a while and setting up a build environment every time is a bit of a pain. With this I can skip straight to syncing the source.

Sent from my Nexus 7 using Tapatalk 4
 

dstruct2k

Senior Member
Jan 31, 2008
1,253
938
Winnipeg
Google Pixel 4
Exact same issue on Kubuntu 12.10. I resolved the bash^M issue by installing dos2unix and converted the script. It ran for the most part but ran into the same errors as above except java also did not install. I had to install openjdk manually using synaptic.

Sent from my Galaxy Nexus
I had to run the Java portion twice. No idea why. It did work the second time though.
 

S0AndS0

Senior Member
May 7, 2012
269
77
i setup a new environment (xubuntu 13.04) and did the same thing you did (copy and paste the commands manually). i had to run the java section twice so it would install just as you said. weird :confused:

I think the run twice on the Java part may have to do with the anti-command-line download dance they've been doing.... did lots of reading before running across the method in the OP's script, there be many that are similar on the web but not a page into the comments you'll likely find similar errors being reported. Worst yet the repo that hosted a script specificity designed to allow users to download Java through the command line has been under constant attack from Java (even though the prompt for the legal agreement is present and the repo isn't hosting any files that Java owns) so... moral of the story?
~ I think the first time you run the command to download and it fails, you get a cookie or some other token, then when you run it a second time and the site checks for that cookie or token it's found and the download processes as though you had accepted the agreement. It'll be interesting to see how long it takes 'em to "fix" it again.

Edited to add more about the Java thing 08152013-
To continue with the Java not liking command line download; I figured much of this out by trying to build my own script to download and install Java but for Linux distributions running on ARM (Raspberry Pi and Android running Linux) a few months back. After much reading and head scratching I came up with something that would instead find the source file on the local file system (downloaded by the user to "/sdcard/downloads") move the file to a directory in the Linux user's home, extract, install and link everything up so things just run. It works for Debian Kit running Squeeze or Wheeze or Ubuntu on top of Android and runs most jar or java files just fine and will likely work for Raspberry Pi too (I don't have one yet to test on) and if that wasn't enough for ARM Linux users I tossed it and the other scripts I've been writing into something along the same lines as what's going on here on this thread for PC Linux users.

If interested in installing Java 7 soft float ARM. Then follow the following link for the script and download the JDK from Oracle manually to the above mentioned file path
https://docs.google.com/document/d/...gr6ON2GIoukKZE2bJjZQ484/edit?usp=docslist_api

If interested in the All in one script that I mentioned then be warned it's still under construction and find it in the guide thread for debian kit.

And to the author of this thread; if ya want to use the above in one of yours feel free just keep the credit tree intact please. Most can be found commented out within each part that they relate to.

Sent from either my SPH-D700 or myTouch3Gs
Debian Kit/QEMU Linux Install guide for all android devices that I'm writing:
http://xdaforums.com/showthread.php?t=2240397
Now have working Installers for ARM Java 7 JDK + Maptools + jMonkey
 
Last edited:
  • Like
Reactions: daggerxXxsin

SupWiz17

Senior Member
Jan 14, 2012
590
67
Chicago, IL
Upgrading to 13.04 now to give this a try. I have stayed on 12.04 for so long because I knew I could set up a solid build environment.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 66
    NLNP's/Team Radium's Build Environment Setup Automater Script


    What does this script do?

    This script is made for people who are lazy like me. lol Jokes apart. This script will setup build environment on your PC running any linux distribution. I have tested it on Ubuntu 13.04 but it should work with almost all linux distros.​

    Requirements:
    • A good internet connection.
    • A PC with Linux x86/64 Bit Architecture. (64 Bit Preffered)


    This is a list of packages that are going to get downloaded.
    • Python
    • JDK
    • GNU Make
    • Git
    • Required Packages for Android Build Environment.
    • Android SDK ADT Bundle

    How to use this script?

    *NOTE*: These instructions will change as per releases so you have to view version specific posts :)

    • Open terminal.
    • cd ~/<Directory where you have downloaded the script>
    • chmod 775 tr-be-script
    • ./tr-be-script
    • Follow the steps :)

    Credits:
    • Me
    • cybojenix
    • My Team! (Team Radium)
    • XxLordxX (Special Thanks)
    • People whom I have missed.
    • All XDians who made guides on [HOW-TO] Setup Build Environment :highfive:

    Changelog:
    • 18/07/2013 - v1.0

      - Initial Release
      - Working
    • 19/07/2013 - v2.0

      - Cleaned up some parts
      - Added SDK Support
    • 19/07/2013 - v2.0.1

      - Fixed up git installing errors
    • 19/07/2013 - v2.5

      - Added missing sudo commands (Thanks to @broodplank1337)
    • 03/10/2013 - v3.0

      - See @broodplank1337's post! :cool:

    Download from Github:
    Find the repo :D
    https://github.com/TeamRadium/tr-be-script
    29
    This is the script! No need to download to view it ;)

    v1.0
    Code:
    #!/bin/bash
    clear
    echo "Linux Build Environment Setup Automater Script."
    echo "Written by nolinuxnoparty."
    echo "Released under supervision of Team Radium."
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Entering Downloads Directory"
    cd ~/Downloads
    read -p "Press [Enter] key to continue..."
    clear
    
    echo "Installing Python!"
    sudo apt-get install build-essential gcc
    wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
    tar -xvzf Python-2.5.6.tgz
    cd Python-2.5.6
    ./configure --prefix=/usr/local/python2.5
    make
    sudo make install
    sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
    cd ..
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing JDK 6!"
    wget  --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
    chmod +x jdk-6u45-linux-x64.bin
    sudo ./jdk-6u45-linux-x64.bin
    sudo mv jdk1.6.0_45 /usr/lib/jvm/
    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
    sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
    sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
    sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
    sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
    java -version
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing GNU Make!"
    
    wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
    tar -xvzf make-3.81.tar.gz
    cd make-3.81
    ./configure
    sudo make install
    cd ..
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing Required Packages!"
    
    apt-get install git-core gnupg flex bison gperf build-essential \
    zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
    libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
    libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing GIT!"
    
    sudo apt-get install git
    y
    
    echo "Installing ADB Drivers!"
    sudo apt-get install android-tools-adb
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Cleaning up downloaded ****!"
    rm Python-2.5.6.tgz
    rm Python-2.5.6
    rm make-3.81.tar.gz
    rm make-3.81
    rm jdk-6u45-linux-x64.bin
    read -p "Press [Enter] key to continue..."
    clear
    
    echo "Done!"
    
    echo "Cheers!"
    echo ""
    echo "Thanks for using this script!"
    echo "Now, Enjoy compiling roms/kernels :)"
    read -p "Press [Enter] key to exit..."
    exit

    v2.0
    Code:
    #!/bin/bash
    clear
    echo "Linux Build Environment Setup Automater Script."
    echo "Written by nolinuxnoparty."
    echo "Released under supervision of Team Radium."
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Entering Downloads Directory"
    cd ~/Downloads
    read -p "Press [Enter] key to continue..."
    clear
    
    echo "Installing Python!"
    sudo apt-get install build-essential gcc
    wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
    tar -xvzf Python-2.5.6.tgz
    cd Python-2.5.6
    ./configure --prefix=/usr/local/python2.5
    make
    sudo make install
    sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
    cd ..
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing JDK 6!"
    wget  --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
    chmod +x jdk-6u45-linux-x64.bin
    sudo ./jdk-6u45-linux-x64.bin
    sudo mv jdk1.6.0_45 /usr/lib/jvm/
    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
    sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
    sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
    sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
    sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
    java -version
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing GNU Make!"
    
    wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
    tar -xvzf make-3.81.tar.gz
    cd make-3.81
    ./configure
    sudo make install
    cd ..
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing Required Packages!"
    
    apt-get install git-core gnupg flex bison gperf build-essential \
    zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
    libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
    libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing GIT!"
    
    sudo apt-get install git
    y
    
    echo "Installing ADB Drivers!"
    sudo apt-get install android-tools-adb
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Downloading and Configuring Android SDK!!"
    echo "Which version of linux are you using?"
    echo "[ 1 ] 32 bits"
    echo "[ 2 ] 64 bits"
    
    echo "Making sure unzip is installed"
    sudo apt-get install unzip
    read bits
    	if [[ "$bits" == "1" ]]; then
    		echo "Downloading SDK for 32bit Linux System"
    		wget http://dl.google.com/android/adt/adt-bundle-linux-x86-20130522.zip
    		echo "Download Complete!!"
    		echo "Extracting"
    		unzip adt-bundle-linux-x86-20130522.zip
    		echo "Configuring"
    		cd ~/adt-bundle-linux-x64-20130522/tools
    		./configure
    		echo "Done!!"
    		
    	elif [[ "$bits" == "2" ]]; then
    		echo "Downloading SDK for 64bit Linux System"
    		wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130522.zip
    		echo "Download Complete!!"
    		echo "Extracting"
    		unzip adt-bundle-linux-x86_64-20130522.zip
    		echo "Configuring"
    		cd ~/adt-bundle-linux-x86_64-20130522/tools
    		./configure
    		echo "Done!!"
    fi
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Cleaning up downloaded ****!"
    rm Python-2.5.6.tgz
    rm Python-2.5.6
    rm make-3.81.tar.gz
    rm make-3.81
    rm jdk-6u45-linux-x64.bin
    rm adt-bundle-linux-x86-20130522
    rm adt-bundle-linux-x86-20130522.zip
    rm adt-bundle-linux-x86_64-20130522
    adt-bundle-linux-x86_64-20130522.zip
    read -p "Press [Enter] key to continue..."
    clear
    
    echo "Done!"
    
    echo "Cheers!"
    echo ""
    echo "Thanks for using this script!"
    echo "Now, Enjoy compiling roms/kernels :)"
    read -p "Press [Enter] key to exit..."
    exit

    v2.0.1
    Code:
    #!/bin/bash
    clear
    echo "Linux Build Environment Setup Automater Script."
    echo "Written by nolinuxnoparty."
    echo "Released under supervision of Team Radium."
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Entering Downloads Directory"
    cd ~/Downloads
    read -p "Press [Enter] key to continue..."
    clear
    
    echo "Installing Python!"
    sudo apt-get install build-essential gcc
    wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
    tar -xvzf Python-2.5.6.tgz
    cd Python-2.5.6
    ./configure --prefix=/usr/local/python2.5
    make
    sudo make install
    sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
    cd ..
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing JDK 6!"
    wget  --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
    chmod +x jdk-6u45-linux-x64.bin
    sudo ./jdk-6u45-linux-x64.bin
    sudo mv jdk1.6.0_45 /usr/lib/jvm/
    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
    sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
    sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
    sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
    sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
    java -version
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing GNU Make!"
    
    wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
    tar -xvzf make-3.81.tar.gz
    cd make-3.81
    ./configure
    sudo make install
    cd ..
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing Required Packages!"
    
    apt-get install git-core gnupg flex bison gperf build-essential \
    zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
    libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
    libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing GIT!"
    
    sudo apt-get install git
    
    echo "Installing ADB Drivers!"
    sudo apt-get install android-tools-adb
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Downloading and Configuring Android SDK!!"
    echo "Which version of linux are you using?"
    echo "[ 1 ] 32 bits"
    echo "[ 2 ] 64 bits"
    
    echo "Making sure unzip is installed"
    sudo apt-get install unzip
    read bits
    	if [[ "$bits" == "1" ]]; then
    		echo "Downloading SDK for 32bit Linux System"
    		wget http://dl.google.com/android/adt/adt-bundle-linux-x86-20130522.zip
    		echo "Download Complete!!"
    		echo "Extracting"
    		unzip adt-bundle-linux-x86-20130522.zip
    		echo "Configuring"
    		cd ~/adt-bundle-linux-x64-20130522/tools
    		./configure
    		echo "Done!!"
    
    	elif [[ "$bits" == "2" ]]; then
    		echo "Downloading SDK for 64bit Linux System"
    		wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130522.zip
    		echo "Download Complete!!"
    		echo "Extracting"
    		unzip adt-bundle-linux-x86_64-20130522.zip
    		echo "Configuring"
    		cd ~/adt-bundle-linux-x86_64-20130522/tools
    		./configure
    		echo "Done!!"
    fi
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Cleaning up downloaded ****!"
    rm Python-2.5.6.tgz
    rm Python-2.5.6
    rm make-3.81.tar.gz
    rm make-3.81
    rm jdk-6u45-linux-x64.bin
    rm adt-bundle-linux-x86-20130522
    rm adt-bundle-linux-x86-20130522.zip
    rm adt-bundle-linux-x86_64-20130522
    adt-bundle-linux-x86_64-20130522.zip
    read -p "Press [Enter] key to continue..."
    clear
    
    echo "Done!"
    
    echo "Cheers!"
    echo ""
    echo "Thanks for using this script!"
    echo "Now, Enjoy compiling roms/kernels :)"
    read -p "Press [Enter] key to exit..."
    exit

    v2.5
    Code:
    #!/bin/bash
    clear
    echo "Linux Build Environment Setup Automater Script."
    echo "Written by nolinuxnoparty."
    echo "Released under supervision of Team Radium."
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Entering Downloads Directory"
    cd ~/Downloads
    read -p "Press [Enter] key to continue..."
    clear
    
    echo "Installing Python!"
    sudo apt-get install build-essential gcc
    wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
    tar -xvzf Python-2.5.6.tgz
    cd Python-2.5.6
    ./configure --prefix=/usr/local/python2.5
    make
    sudo make install
    sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
    cd ..
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing JDK 6!"
    wget  --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
    chmod +x jdk-6u45-linux-x64.bin
    sudo ./jdk-6u45-linux-x64.bin
    sudo mv jdk1.6.0_45 /usr/lib/jvm/
    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
    sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
    sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
    sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
    sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
    java -version
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing GNU Make!"
    
    wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
    tar -xvzf make-3.81.tar.gz
    cd make-3.81
    ./configure
    sudo make install
    cd ..
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing Required Packages!"
    
    sudo apt-get install git-core gnupg flex bison gperf build-essential \
    zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
    libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
    libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Installing GIT!"
    
    sudo apt-get install git
    
    echo "Installing ADB Drivers!"
    sudo apt-get install android-tools-adb
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Downloading and Configuring Android SDK!!"
    echo "Which version of linux are you using?"
    echo "[ 1 ] 32 bits"
    echo "[ 2 ] 64 bits"
    
    echo "Making sure unzip is installed"
    sudo apt-get install unzip
    read bits
    	if [[ "$bits" == "1" ]]; then
    		echo "Downloading SDK for 32bit Linux System"
    		wget http://dl.google.com/android/adt/adt-bundle-linux-x86-20130522.zip
    		echo "Download Complete!!"
    		echo "Extracting"
    		unzip adt-bundle-linux-x86-20130522.zip
    		echo "Configuring"
    		cd ~/adt-bundle-linux-x64-20130522/tools
    		./configure
    		echo "Done!!"
    
    	elif [[ "$bits" == "2" ]]; then
    		echo "Downloading SDK for 64bit Linux System"
    		wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130522.zip
    		echo "Download Complete!!"
    		echo "Extracting"
    		unzip adt-bundle-linux-x86_64-20130522.zip
    		echo "Configuring"
    		cd ~/adt-bundle-linux-x86_64-20130522/tools
    		./configure
    		echo "Done!!"
    fi
    
    read -p "Press [Enter] key to continue..."
    
    clear
    
    echo "Cleaning up downloaded ****!"
    rm Python-2.5.6.tgz
    rm Python-2.5.6
    rm make-3.81.tar.gz
    rm make-3.81
    rm jdk-6u45-linux-x64.bin
    rm adt-bundle-linux-x86-20130522
    rm adt-bundle-linux-x86-20130522.zip
    rm adt-bundle-linux-x86_64-20130522
    adt-bundle-linux-x86_64-20130522.zip
    read -p "Press [Enter] key to continue..."
    clear
    
    echo "Done!"
    
    echo "Cheers!"
    echo ""
    echo "Thanks for using this script!"
    echo "Now, Enjoy compiling roms/kernels :)"
    read -p "Press [Enter] key to exit..."
    exit
    11
    Unicorns boomed here.
    10
    V2.5

    Changelog:
    - Added missing sudo commands (Thanks to @broodplank1337)

    Downloads:
    http://tinyw.in/rdSX

    Usage:
    cd ~/<DownloadDirectory>
    chmod 775 tr-be-script-v2.5
    ./tr-be-script-v2.5

    Github:
    https://github.com/TeamRadium/tr-be-script/commit/265553aa4abdbeb9b4a9128ffd29fffcfe6048da