@@ -50,7 +50,6 @@ build_all_examples [-a|--archive] - Copy the binary to the export locati
5050}
5151
5252# Assume the most recent configs
53- BRANCH=import-2.1.x
5453unset FIRST_CONF
5554EXIT_USAGE=
5655LIMIT=1000
@@ -99,6 +98,11 @@ shift $((OPTIND - 1))
9998
10099# Check for mixed continue, skip, resume arguments. Only one should be used.
101100(( CONTINUE + CONTSKIP + ISRES + PURGE > 1 )) && { echo " Don't mix -c, -p, -s, and -r options" ; echo ; EXIT_USAGE=2 ; }
101+ [[ -n $BRANCH && -n $CBASE ]] && { echo " Don't mix --branch ($BRANCH ) and --base ($CBASE ) options" ; echo ; EXIT_USAGE=2 ; }
102+
103+ # Assume import-2.1.x if no --base or --brancs is given.
104+ # If no --base is supplied, one will be created.
105+ [[ -z $BRANCH && -z $CBASE ]] && BRANCH=import-2.1.x
102106
103107# Exit with helpful usage information
104108(( EXIT_USAGE)) && { usage ; let EXIT_USAGE-- ; exit $EXIT_USAGE ; }
@@ -162,9 +166,6 @@ export PAUSE=1
162166# (not a pipeline subshell) so that exit 1 actually propagates.
163167while IFS= read -r -d $' \0' CONF; do
164168
165- # Remove the file name and slash from the end of the path
166- CONF=${CONF%/* }
167-
168169 # Get a config's directory name
169170 DIR=${CONF# $CBASE / config/ examples/ }
170171
@@ -214,8 +215,7 @@ while IFS= read -r -d $'\0' CONF; do
214215
215216 export PAUSE=0
216217
217- done < <( find " $CBASE " /config/examples -type d -name ' Configuration.h' -o -name ' Configuration_adv.h' -print0 \
218- | LC_ALL=C sort -fz)
218+ done < <( find " $CBASE /config/examples" \( -name Configuration.h -o -name Configuration_adv.h \) -type f -exec dirname {} \; | LC_ALL=C sort -u)
219219
220220echo " Exiting"
221221
0 commit comments