aboutsummaryrefslogtreecommitdiff
path: root/libs/project
diff options
context:
space:
mode:
authorSwift Geek <swiftgeek@gmail.com>2019-03-29 08:43:02 +0000
committerGogs <gogitservice@gmail.com>2019-03-29 08:43:02 +0000
commitfce0d8a6454e82e2c5ef1b8102ee04258331bb56 (patch)
tree33967cd745202bc31ddedcd427bcac20cd99d6dd /libs/project
parent8d86dd3fbd6f9f7582ae30d886bd78805e51b450 (diff)
parent89176737ad54ddbdef55e0c207ccd5dba7ade2b4 (diff)
downloadlibrebootfr-fce0d8a6454e82e2c5ef1b8102ee04258331bb56.tar.gz
librebootfr-fce0d8a6454e82e2c5ef1b8102ee04258331bb56.zip
Merge branch 'libs-git' of and_who/libreboot into master
Diffstat (limited to 'libs/project')
-rwxr-xr-xlibs/project22
1 files changed, 9 insertions, 13 deletions
diff --git a/libs/project b/libs/project
index f2692cd6..25d6ca74 100755
--- a/libs/project
+++ b/libs/project
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
-# Copyright (C) 2018 Andrew Robbins <contact@andrewrobbins.info>
+# Copyright (C) 2018,2019 Andrew Robbins <contact@andrewrobbins.info>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -143,21 +143,17 @@ project_action() {
shift
local arguments="$*"
- (
- set +e
-
- project_action_check "$action" "$project" "$@"
+ project_action_check "$action" "$project" "$@"
- printf '%s\n\n' "Project $project $action (with ${arguments:-no argument})"
+ printf '%s\n\n' "Project $project $action (with ${arguments:-no argument})"
- if "$action" "$@"; then
- printf '\n%s\n' "Project $project $action (with ${arguments:-no argument}) completed"
- else
- printf 1>&2 '\n%s\n' "Project $project $action (with ${arguments:-no argument}) failed"
+ if (set +e; "$action" "$@"); then
+ printf '\n%s\n' "Project $project $action (with ${arguments:-no argument}) completed"
+ else
+ printf 1>&2 '\n%s\n' "Project $project $action (with ${arguments:-no argument}) failed"
- return 1
- fi
- )
+ return 1
+ fi
}
project_action_check() {