update buildroot - work in progress development
[cmdllinux.git] / buildroot / _buildroot / buildroot / usertable / _find_users_table_entries.sh
blobcf2f127acad484ba82d501b6c0f66cfec2d94572
1 #IFS=
2 printfile=1
3 [ "$1" = "-n" ] && printfile=
4 set -f
6 cd package
8 #find -mindepth 2 -type f -name "*.mk" | \
9 find -mindepth 2 -type f -name "*.mk" ! -path "./gcc/*" ! -path "./tzdata/*" | \
10 while read line; do
11 sh _find_file_section.sh -i "$line" "^define[[:space:]]\+.*_USERS" "^endef"
12 done | \
13 while read -r uline; do
14 case "$uline" in
15 ---*)
16 file=`echo "$uline" | sed 's/^---//'`
17 [ ! -z "$printfile" ] && echo "$file"
19 \$\(*)
20 VAR=`echo "$uline" | sed -e 's/^$(//' -e 's/)$//'`
21 grep "^$VAR[[:space:]]\+[+:=-]\+[[:space:]]\+" "$file" | sed -n 's/^\([^+:=-]\+[+:=-]\+[[:space:]]\+\)\(.*\)/\2/p'
24 echo "$uline"
26 esac
27 done