01-31-2020, 01:33 AM
I recommend adding "set -e" to the top of the script, so that e.g. a failure to cd to $DEVDIR won't result in mesa getting plopped into the working directory. ("set -e" is good shell scripting practice in general.) Also, I recommend replacing:
with:
so that it won't try to clone mesa if it's already been cloned.
Neither of these are major issues, and apart from the inevitable "what packages are actually needed" problem any script like this will face, this seems pretty good.
Code:
git clone --depth=1 https://gitlab.freedesktop.org/mesa/mesa.git
with:
Code:
test -d mesa || git clone --depth=1 https://gitlab.freedesktop.org/mesa/mesa.git
so that it won't try to clone mesa if it's already been cloned.
Neither of these are major issues, and apart from the inevitable "what packages are actually needed" problem any script like this will face, this seems pretty good.