diff options
author | Andrew Robbins <contact@andrewrobbins.info> | 2017-07-22 02:10:25 -0400 |
---|---|---|
committer | Andrew Robbins <contact@andrewrobbins.info> | 2017-07-22 02:30:56 -0400 |
commit | 5abde443b2bdae7723b046f3db3b8e821ab67cde (patch) | |
tree | 56982831fb44af6d511cae6882bf8dbba2367123 /libreboot | |
parent | 308b5eefe3a3a586347c47970a01bb2bac4cb951 (diff) | |
download | librebootfr-5abde443b2bdae7723b046f3db3b8e821ab67cde.tar.gz librebootfr-5abde443b2bdae7723b046f3db3b8e821ab67cde.zip |
Make 'sources' consequent prettier
Removes an unnecessary subshell grouping and 'set' statement and
replaces it with a good ol' if/then/else construct. Also added a
message printed to stdout informing the user of the change from
extraction to downloading if source extraction fails.
Diffstat (limited to 'libreboot')
-rwxr-xr-x | libreboot | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -78,12 +78,12 @@ libreboot_project() { case "${action}" in 'sources') - ( - set +e - - project_action_arguments 'extract' "${project}" "$@" && return 0 - project_action_arguments 'download' "${project}" "$@" && return 0 - ) + if project_action_arguments 'extract' "${project}" "$@"; then + return + else + printf '\n%s\n\n' 'Attempting to download instead...' + project_action_arguments 'download' "${project}" "$@" + fi ;; 'produce') for action in 'build' 'install' 'release'; do |