

With the caveat that I’m currently blanking on the semantics of sub-shells yes I think you’re right, -f
is about not executing <hmtl><h1>404 Not Found</h1></html>
. Does curl output half-transferred documents to stdout in the first place, though, and also bash -c
is going to hit the command line length limit at some point.
And no I haven’t tried anything of this. I use a distribution, I have a package installer.
Just skimmed through
rustup-init.sh
and executing half-downloaded things is not an issue, it’s all function declarations, oneset -u
and one variable declaration (without side effects) before the last line of the script kicks off everything withmain "$@" || exit 1
. It’s also a dash/bash/ksh/zsh/whatever-polyglot, someone put a lot of thought in this. Also it’s actually just figuring out the architecture and OS to know what binary installer to download. So don’t worry, it won’t accidentallyrm -rf /usr
.