File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ if [ -z "${SOURCE_PACKAGE}" ]; then
3939 PROJECT_ROOT=" ${BASE_DIR} /../"
4040 cd ${PROJECT_ROOT}
4141
42+ # Sanity check to ensure that resolved paths are valid; a LICENSE file should always exist in project root
43+ if [ ! -f ${PROJECT_ROOT} /LICENSE ]; then
44+ echo " Project root path ${PROJECT_ROOT} is not valid; script may be in the wrong directory."
45+ exit 1
46+ fi
47+
4248 RUN_RAT=" java -jar ${rat_jar} -E ${PROJECT_ROOT} /dev/.rat-excludes -d ${PROJECT_ROOT} "
4349else
4450 EXTENSION=' .tar.gz'
4955 RUN_RAT=" java -jar ${rat_jar} -d ${PACKAGE_DIR} "
5056fi
5157
52- pwd
53- ls
54-
5558mkdir -p rat
5659download_rat_jar
5760
5861$RUN_RAT > rat/rat-results.txt
5962
60- cat rat/rat-results.txt
61-
6263if [ $? -ne 0 ]; then
6364 echo " RAT exited abnormally"
6465 exit 1
6566fi
6667
68+ cat rat/rat-results.txt
69+
6770ERRORS=" $( cat rat/rat-results.txt | grep -e " ??" ) "
6871
6972if [[ -n " ${ERRORS} " ]]; then
You can’t perform that action at this time.
0 commit comments