At the moment the script looks for the jar iside the out dir. However, if the our dir is set to a different directory via OUT_DIR_COMMON_BASE the script does not notice that, and errors out saying a build is needed. This commits checks if the OUT_DIR_COMMON_BASE is set, then searches the jar in the proper path. If OUT_DIR_COMMON_BASE is unset, search in "out" like it did before. Test: Build with OUT_DIR_COMMON_BASE set and unset and verify idegen works in both cases. Change-Id: Icfcf41af13139bd81f8589bb900debe5ee616022
19 lines
461 B
Bash
Executable File
19 lines
461 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ! -d development ]; then
|
|
echo "Error: Run from the root of the tree."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -z ${OUT_DIR_COMMON_BASE} ]]; then
|
|
idegenjar=`find out -name idegen.jar -follow | grep -v intermediates`
|
|
else
|
|
idegenjar=`find $OUT_DIR_COMMON_BASE/$(basename "$PWD") -name idegen.jar -follow | grep -v intermediates`
|
|
fi
|
|
|
|
if [ "" = "$idegenjar" ]; then
|
|
echo "Couldn't find idegen.jar. Please run make first."
|
|
else
|
|
java -cp $idegenjar Main
|
|
fi
|