98_bash.sh 464 Bytes
Newer Older
1 2 3 4 5 6 7 8
#!/bin/bash
if [ -t 0 ] ; then
    COLORON="\e[1m\e[31m"
    COLOROFF="\e[0m"
else
    COLORON=""
    COLOROFF=""
fi
9
ERROR="${COLORON}[ERROR]${COLOROFF}"
10

11
/bin/sh --version 2>&1 | grep -i bash || {
12 13 14 15
    echo -e "${ERROR} Many legacy Makefiles used depend on /bin/sh pointing to bash."
    echo -e "${ERROR} You need to change your /bin/sh appropriately - e.g."
    echo -e "${ERROR}"
    echo -e "${ERROR}    cd /bin ; sudo rm sh ; sudo ln -s bash sh"
16 17
    exit 1
}