Skip to content

Commit 87a4374

Browse files
Merge pull request #1966 from craigcomstock/tidy-install-dependencies-script
tidy up install-dependencies script a bit to be more obvious/verbose about usage
2 parents c5e0a3e + 3f94a8f commit 87a4374

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,11 @@
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+
usage() {
20+
echo "Usage: PROJECT=[nova|community] EXPLICIT_ROLE=[hub|agent] BUILD_TYPE=[DEBUG|RELEASE] $0"
21+
}
2222

2323
. "$(dirname "$0")"/functions
2424
. detect-environment
@@ -155,7 +155,9 @@ for dep in $DEPS; do
155155
tests=yes
156156
;;
157157
*)
158-
fatal "Unknown build type: $BUILD_TYPE"
158+
log_error "Unknown build type: $BUILD_TYPE"
159+
usage
160+
exit 1
159161
;;
160162
esac
161163

@@ -171,6 +173,7 @@ for dep in $DEPS; do
171173
esac
172174

173175
# Add $PREFIX to version of built dependencies so they get different package names and are distinguishable from each
176+
# Note that this revision file is created by build-scripts/autogen
174177
revision=$(cat "$BASEDIR"/buildscripts/deps-packaging/revision)
175178
if [ "$BUILDPREFIX" != "/var/cfengine" ]; then
176179
safe_prefix="+$(echo "$PREFIX" | sed 's:/::g')"

0 commit comments

Comments
 (0)