Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For better or for worse, with shell, the line between "a list of instructions to be typed in" and "shell script" is very, very thin.

Toss a

    #!/usr/bin/bash

    set -e
on top of that, call it "setup.sh", and give it a runthrough, and you're halfway to it being as "automated" as it needs to be to start with. You're fall more likely to get people start PR'ing a running shell script than dead text files.

(set -e will make the script stop when something returns with an error exit code. Despite temptation, given the size of this script I do advise doing your best to work with that... this is just the sort of script that if you let it blunder ahead blindly, when something doesn't work you'll need an hour just to figure out what didn't work, let alone fix it....)



Some of the steps require user input. Is the "set -e" for dealing with that? Also at least one reboot is needed, the script depends on a lot of external sources being up, and I have seen different behavior on the kernel upgrade steps.


No, see edit. But there are ways to do user input in shell, see Google. (By which I mean I literally do not personally know the best answers and that's what I'd be doing anyhow if I tried to explain here.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: