gcc installation script for Centos6.6
For the most part, your script is quite fine.

Taming the long lines

These blocks of code have some issues:


cd gmp &amp;&amp; ./configure --enable-shared --enable-static --prefix=/usr/local &gt;$LOGFILE 2&gt;&amp;1 &amp;&amp; make &gt;$LOGFILE 2&gt;&amp;1 &amp;&amp; make check &gt;$LOGFILE 2&gt;&amp;1 &amp;&amp; make install &gt;$LOGFILE 2&gt;&amp;1 &amp;&amp; cd ..



Issues:


The first line is too long

It's easy to be lazy to scroll to the right
Code that's less visible, is more error-prone, easy to overlook something
Long lines are harder to edit in practice

Wrapping a bunch of commands in cd somewhere; ...; cd .. is error prone: 
it's an extra mental burden to make sure that you'll end up in the right directory after the chain of commands, keeping in mind possible errors too.
As much as possible, it's good to look for alternatives.
Too much repetition of &gt;$LOGFILE 2&gt;&amp;1


It would be better this way:

(
    cd gmp &amp;&amp; \
        ./configure --enable-shared --enable-static --prefix=/usr/local &amp;&amp; \
        make &amp;&amp; make check &amp;&amp; make install
) &gt;$LOGFILE 2&gt;&amp;1


The (...) is a sub-shell,
so directory changes won't affect the enclosing script.
Once the sub-shell is finished,
you'll be back in the original directory.
Grouping commands like this (also with {...}) makes it easier to redirect all output.
I didn't break up the lines of make a b c,
because the line was already short enough,
and quite idiomatic that way.
The exit code after the (...) will be as you would expect,
the grouping won't affect it.

Do similarly for all the long lines.

Avoid changing directories in the middle of scripts.
When you must do, consider wrapping the relevant commands within (...).

Simplifying the exit code handling

The exit code handling can be simpler:


ret="$?"
errorIf gmp $ret
echo "gmp Installed!:)"



There's no need to save $? in ret.
You could use it directly.
In fact, the function can use it directly,
no need to pass it explicitly.
You can rewrite the errorIf function like this:

errorIf() {
    if [ $? -ne 0 ]; then
        echo "Something was wrong with $1"
        exit 1
    fi
}


And then simplify the exit code handling to this:

errorIf gmp
echo "gmp Installed!:)"


ShellCheck

The http://www.shellcheck.net/# website is pretty awesome.
It points out a few additional issues I recommend to fix.