@@ -23,11 +23,11 @@ ARCHS_SRC_TO_BUILD="armeabi armeabi-v7a arm64-v8a x86 x86-64"
2323
2424# set the space separated list of project directories in PROJECTS_DIR that you want to build
2525# the root of each project directory must contain the BUILD_FILE_NAME file that build and installs the project
26- # PROJECTS_TO_BUILD="fuse"
26+ # PROJECTS_TO_BUILD="fuse bindfs "
2727PROJECTS_TO_BUILD=" "
2828
2929# set the space separated list of post build scripts files in POST_BUILD_SCRIPTS_DIR that you want to run
30- # POST_BUILD_SCRIPTS_TO_RUN="fusermount_extractor.sh"
30+ # POST_BUILD_SCRIPTS_TO_RUN="fusermount_extractor.sh bindfs_extractor.s "
3131POST_BUILD_SCRIPTS_TO_RUN=" "
3232
3333
@@ -351,22 +351,20 @@ trap cleanup EXIT
351351# cd to PARENT_DIRECTORY before beginning build process
352352cd " $PARENT_DIRECTORY "
353353
354- # for all ARCH_FILEs in the ARCHS_DIR
355- for ARCH_FILE in " $ARCHS_DIR " /* ; do
354+
355+ # for all arch_srcs in the ARCHS_SRC_TO_BUILD
356+ for arch_src in $ARCHS_SRC_TO_BUILD ; do
357+
358+ ARCH_FILE=" $ARCHS_DIR /$arch_src "
356359
357360 # if not a regular file, then skip
358361 if [ ! -f " $ARCH_FILE " ]; then
362+ echo " Skipping build for $arch_src since $ARCH_FILE file does not exist"
359363 continue
360364 fi
361365
362- # get ARCH_SRC from basename of ARCH_FILE
363- export ARCH_SRC=" $( basename " $ARCH_FILE " ) "
364-
365- # if ARCH_SRC is not defined in the ARCHS_SRC_TO_BUILD, then skip
366- if [[ ! " $ARCHS_SRC_TO_BUILD " =~ (^| [[:space:]])" $ARCH_SRC " ($| [[:space:]]) ]]; then
367- echo " Skipping build for $ARCH_SRC "
368- continue
369- fi
366+ # set ARCH_SRC to arch_src
367+ export ARCH_SRC=" $arch_src "
370368
371369 # cd to PARENT_DIRECTORY before building for each ARCH_SRC
372370 cd " $PARENT_DIRECTORY "
@@ -653,26 +651,21 @@ for ARCH_FILE in "$ARCHS_DIR"/*; do
653651 continue
654652 fi
655653
656- # for all PROJECT_DIRs in the BUILD_DIR
657- for PROJECT_DIR in " $BUILD_DIR " /* ; do
658-
654+ # for all projects in the PROJECTS_TO_BUILD
655+ for project in $PROJECTS_TO_BUILD ; do
656+
657+ PROJECT_DIR=" $BUILD_DIR /$project "
658+
659659 # if not a directory, then skip
660660 if [ ! -d " $PROJECT_DIR " ]; then
661+ echo " Skipping build for $project since $PROJECT_DIR directory does not exist"
661662 continue
662663 fi
663664
664- # get PROJECT from basename of PROJECT_DIR
665- export PROJECT=" $( basename " $PROJECT_DIR " ) "
665+ # set PROJECT to current_project
666+ export PROJECT=" $project "
666667
667668 echo -e " \n\n\n\n\n"
668- echo " Processing $PROJECT "
669-
670- # if PROJECT is not defined in the PROJECTS_TO_BUILD, then skip
671- if [[ ! " $PROJECTS_TO_BUILD " =~ (^| [[:space:]])" $PROJECT " ($| [[:space:]]) ]]; then
672- echo " Skipping build for $PROJECT "
673- continue
674- fi
675-
676669 echo " Building $PROJECT for $ARCH_SRC "
677670
678671 # cd to BUILD_DIR
@@ -731,29 +724,24 @@ if [ $ONLY_BUILD_TOOLCHAINS -eq 1 ]; then
731724 exit
732725fi
733726
734-
735727# if post build scripts need to run
736728if [ $RUN_POST_BUILD_SCRIPTS -eq 1 ]; then
737729
738- # for all POST_BUILD_SCRIPT_FILEs in the POST_BUILD_SCRIPTS_DIR
739- for POST_BUILD_SCRIPT_FILE in " $POST_BUILD_SCRIPTS_DIR " /* ; do
730+ # for all post_build_scripts in the POST_BUILD_SCRIPTS_TO_RUN
731+ for post_build_script in $POST_BUILD_SCRIPTS_TO_RUN ; do
732+
733+ POST_BUILD_SCRIPT_FILE=" $POST_BUILD_SCRIPTS_DIR /$post_build_script "
740734
741735 # if not a file, then skip
742736 if [ ! -f " $POST_BUILD_SCRIPT_FILE " ]; then
737+ echo " Skipping run for $post_build_script since $POST_BUILD_SCRIPT_FILE file does not exist"
743738 continue
744739 fi
745740
746- # get POST_BUILD_SCRIPT from basename of POST_BUILD_SCRIPT_FILE
747- POST_BUILD_SCRIPT=" $( basename " $POST_BUILD_SCRIPT_FILE " ) "
741+ # set POST_BUILD_SCRIPT to post_build_script
742+ POST_BUILD_SCRIPT=" $post_build_script "
748743
749744 echo -e " \n\n\n\n\n"
750- echo " Processing $POST_BUILD_SCRIPT "
751-
752- # if POST_BUILD_SCRIPT is not defined in the POST_BUILD_SCRIPTS_TO_RUN, then skip
753- if [[ ! " $POST_BUILD_SCRIPTS_TO_RUN " =~ (^| [[:space:]])" $POST_BUILD_SCRIPT " ($| [[:space:]]) ]]; then
754- echo " Skipping run for $POST_BUILD_SCRIPT "
755- continue
756- fi
757745
758746 # cd to POST_BUILD_SCRIPTS_DIR before running script
759747 cd " $POST_BUILD_SCRIPTS_DIR "
0 commit comments