forked from kafka4beam/brod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed brod to brod_cli, then created a new shell script named brod.
Made it to lookup erts in parent dir, so a user without erts in PATH can execut `./brod/bin/brod <command> <opts..>` directly instead of `/brod/bin/erts-*/bin/escript /brod/bin/brod <command> <opts...>`
- Loading branch information
Showing
7 changed files
with
35 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ | |
*.srl | ||
*.p12 | ||
*.jks | ||
brod.escript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh -e | ||
|
||
# can not readlink -f because mac version readlink does not support -f | ||
LINK="$(readlink "$0")" || true | ||
if [ -z $LINK ]; then | ||
# not a symlink | ||
BINDIR="$(dirname "$0")" | ||
else | ||
# get the link target's dir | ||
BINDIR="$(dirname "$LINK")" | ||
fi | ||
|
||
ERTS_BIN="$BINDIR/../erts/bin" | ||
|
||
if [ -d "$ERTS_BIN" ]; then | ||
# this is a release, try to use erts in release | ||
exec $ERTS_BIN/escript $BINDIR/brod_cli "$@" | ||
else | ||
# hoping the user has erts in PATH | ||
exec $BINDIR/brod_cli "$@" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters