Setting up a development environment - 2
These conditions are mutually exclusive, so they should be chained using elif:


if [ $# -eq 0 ]
then
    a="client"
fi

if [ $# -eq 1 ]
then
    a="$1"
fi

if [ $# -gt 1 ]
then
    a="$1"
    echo "Git-tooo many arguments"
fi



Like this:

if [ $# -eq 0 ]
then
    a="client"
elif [ $# -eq 1 ]
then
    a="$1"
else
    a="$1"
    echo "Git-tooo many arguments"
fi


This avoids unnecessary evaluations. That is, when $# is 0, only the first condition will be evaluated, the others won't be. In your original code, all conditions will be evaluated always.



As mentioned in the previous review, changing directory inside a script is not recommended. In config_grunt you have this as the last statement of the function:

cd ~/root


It seems pointless, and as it doesn't seem to have anything to do with configuring grunt, it probably shouldn't be in this function.