Skip to content

Commit 80b52db

Browse files
committed
tidy up install-dependencies script a bit to be more obvious/verbose about usage
PROJECT should be community or nova, not enterprise Print out usage message when BUILD_TYPE is not provided or one of the supported values.
1 parent 12ce7fe commit 80b52db

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

build-scripts/install-dependencies

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
#
1515
# ^ When building community you won't need enterprise, nova.
1616
#
17-
# The script can be run as follows:
18-
# ```
19-
# $ PROJECT=[enterprise|community] EXPLICIT_ROLE=[hub|agent] BUILD_TYPE=[DEBUG|RELEASE] ./buildscripts/build-scripts/install-dependencies
20-
# ```
21-
#
17+
# The script can be run as described in the usage message below:
18+
19+
function usage() {
20+
echo "Usage: PROJECT=[nova|community] EXPLICIT_ROLE=[hub|agent] BUILD_TYPE=[DEBUG|RELEASE] $0"
21+
exit 0
22+
}
2223

2324
. "$(dirname "$0")"/functions
2425
. detect-environment
@@ -155,7 +156,9 @@ for dep in $DEPS; do
155156
tests=yes
156157
;;
157158
*)
158-
fatal "Unknown build type: $BUILD_TYPE"
159+
log_error "Unknown build type: $BUILD_TYPE"
160+
usage
161+
exit 1
159162
;;
160163
esac
161164

0 commit comments

Comments
 (0)