Skip to content

Commit

Permalink
[ADAM-1105] Use assembly jar in adam-shell.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnothaft committed Aug 10, 2016
1 parent 273d57f commit a12eac9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/adam-shell
Expand Up @@ -31,17 +31,17 @@ ADAM_CLI_JAR=
if [ -d "$SCRIPT_DIR/repo" ]; then
ASSEMBLY_DIR="$SCRIPT_DIR/repo"
else
ASSEMBLY_DIR="$SCRIPT_DIR/adam-cli/target"
ASSEMBLY_DIR="$SCRIPT_DIR/adam-assembly/target"
fi

num_jars="$(ls -1 "$ASSEMBLY_DIR" | grep "^adam-cli_[0-9A-Za-z\.-]*\.jar$" | grep -v javadoc | wc -l)"
num_jars="$(ls -1 "$ASSEMBLY_DIR" | grep "^adam_[0-9A-Za-z\.-]*\.jar$" | grep -v javadoc | wc -l)"
if [ "$num_jars" -eq "0" ]; then
echo "Failed to find ADAM cli assembly in $ASSEMBLY_DIR." 1>&2
echo "Failed to find ADAM assembly in $ASSEMBLY_DIR." 1>&2
echo "You need to build ADAM before running this program." 1>&2
exit 1
fi

ASSEMBLY_JARS="$(ls -1 "$ASSEMBLY_DIR" | grep "^adam-cli_[0-9A-Za-z\.-]*\.jar$" | grep -v javadoc || true)"
ASSEMBLY_JARS="$(ls -1 "$ASSEMBLY_DIR" | grep "^adam_[0-9A-Za-z\.-]*\.jar$" | grep -v javadoc || true)"
if [ "$num_jars" -gt "1" ]; then
echo "Found multiple ADAM cli assembly jars in $ASSEMBLY_DIR:" 1>&2
echo "$ASSEMBLY_JARS" 1>&2
Expand Down

0 comments on commit a12eac9

Please sign in to comment.