Build script for an operating system written in C++
Instead of repeated statements like this:


echo "==============================================="



I suggest adding a helper function, for example:

print_hr() {  # hr - as in horizontal rule
    echo "==============================================="
}


The advantage of this is if you later decide to change the length of the = in the line, you can change it in one place.



Instead of entering into sub-directories with cd dirname and later stepping back with cd .., I recommend to use sub-shell environments with (...). For example, instead of this:


cd include
rm *.o
scons
# Move all Object Files into Build Directory
cp *.o ../build
cd ..



Do like this:

(
    cd include
    rm *.o
    scons
    # Move all Object Files into Build Directory
    cp *.o ../build
)


Notice that there is no more cd ...
Working directory changes in a (...) sub-shell environment are only in effect within.



This maybe a matter of taste, but I find that the many comment lines like this are just noise, and make the script hard to read, I suggest to remove them:

# ----------------------------------------------------------------------------------------------