Pass --fail to curl

Ensure that the setup process will stop early if a script can't be retreived.
This commit is contained in:
cimryan
2018-11-03 10:44:29 -07:00
parent 9c37d42b4d
commit f0b6cae2ea

View File

@@ -113,7 +113,7 @@ function get_script () {
local name="$2"
local remote_path="${3:-}"
curl -o "$local_path/$name" https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/"$remote_path"/"$name"
curl --fail -o "$local_path/$name" https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/"$remote_path"/"$name"
# wget -O "$local_path/$name" https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/"$remote_path"/"$name"
chmod +x "$local_path/$name"
setup_progress "Downloaded $local_path/$name ..."