History

scripts/tags.sh: use `find` for $ALLSOURCE_ARCHS generation

The current code includes 'Kconfig' in ALLSOURCE_ARCHS, but it should not (Kconfig is not an architecture). Replace this with a find-generated string and directly assign it to $ALLSOURCE_ARCHS. The find_all_archs() function is no longer needed for a one-liner with obvious semantics, so inline the arch generation into the surrounding conditional.

Joey Pabalinas committed 8 years ago

Commit 656c1071 parent 21195f81 file · +1 −10Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/tags.sh+1−10
@@ -28,20 +28,11 @@ fi · 27 unmodified lines
28# ignore userspace tools28# ignore userspace tools
29ignore="$ignore ( -path ${tree}tools ) -prune -o"29ignore="$ignore ( -path ${tree}tools ) -prune -o"
30 30
31# Find all available archs
32find_all_archs()
33{
34 ALLSOURCE_ARCHS=""
35 for arch in `ls ${tree}arch`; do
36 ALLSOURCE_ARCHS="${ALLSOURCE_ARCHS} "${arch##\/}
37 done
38}
39
40# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH31# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
41if [ "${ALLSOURCE_ARCHS}" = "" ]; then32if [ "${ALLSOURCE_ARCHS}" = "" ]; then
42 ALLSOURCE_ARCHS=${SRCARCH}33 ALLSOURCE_ARCHS=${SRCARCH}
43elif [ "${ALLSOURCE_ARCHS}" = "all" ]; then34elif [ "${ALLSOURCE_ARCHS}" = "all" ]; then
44 find_all_archs35 ALLSOURCE_ARCHS=$(find ${tree}arch/ -mindepth 1 -maxdepth 1 -type d -printf '%f ')
45fi36fi
46 37
47# find sources in arch/$ARCH38# find sources in arch/$ARCH