2 ms·
Also like the bootstrap.sh - very nicely structured and easier to verify than many others I've seen. I'd still prefer these scripts to output missing dependenci
by e12e 13y ago
Also like the bootstrap.sh - very nicely structured and easier to verify than many others I've seen. I'd still prefer these scripts to output missing dependencies that calling sudo -- but otherwise very nice.
That is, rather than:
function install_git() {
echo 'Trying to install git'
case $(uname -s) in
#...
Linux)
if has_exec apt-get; then apt_update
sudo apt-get install -y git
#...
else bail "Unknown linux variant"
fi
;;
*)
bail "Unknown operating system $(uname -s)"
;;
esac
}
Simply aggreagate a list of missing packages, and ouput (based on a
similar case-statement for detetining host):
echo Please install missing packages:
echo sudo apt-get install ${missing-deps}
https://github.com/larsyencken/marelle/blob/master/bootstrap.sh https://github.com/larsyencken/marelle/blob/master/bootstrap...
- lars512 13y agoThanks! :) It's a little aggressive in calling sudo mainly because I'm using it to bootstrap new systems non-interactively. I don't want it to ask any questions at all, just to go.