Skip to content

Commit

Permalink
setup-development-environment.bash: Add runtime dependency check
Browse files Browse the repository at this point in the history
Signed-off-by: 林博仁 <[email protected]>
  • Loading branch information
brlin-tw committed Jun 12, 2017
1 parent 91360f5 commit db3f154
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions setup-development-environment.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ set -o errtrace
set -o nounset
set -o pipefail

for required_command in\
realpath\
basename\
dirname\
git\
rm
do
if ! command -v "${required_command}" >/dev/null; then
printf\
"Error: This program requires \"${required_command}\" command in your \$PATH.\n"\
1>&2
exit 1
fi
done

## Non-overridable Primitive Variables
## BASHDOC: Shell Variables » Bash Variables
## BASHDOC: Basic Shell Features » Shell Parameters » Special Parameters
Expand Down

0 comments on commit db3f154

Please sign in to comment.