mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 07:02:34 +02:00
util/list_yet_unsupported_chips.h: Fix path
Change-Id: Iecb6cf3d1f214102a243a3ffa8d0c9301263af0a Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/81855 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:
parent
c06abc9014
commit
e5ed0c6340
@ -2,20 +2,20 @@
|
|||||||
|
|
||||||
scriptname=$(readlink -f "$0") 2>/dev/null
|
scriptname=$(readlink -f "$0") 2>/dev/null
|
||||||
path=$(dirname "$scriptname")/.. 2>/dev/null
|
path=$(dirname "$scriptname")/.. 2>/dev/null
|
||||||
if [ ! -e "$path/flashchips.c" -o ! -e "$path/flashchips.h" ]; then
|
if [ ! -e "$path/flashchips.c" -o ! -e "$path/include/flashchips.h" ]; then
|
||||||
echo "Warning: could not calculate flashchips.[ch]'s directory. Trying current..."
|
echo "Warning: could not calculate flashchips.[ch]'s directory. Trying current..."
|
||||||
path="."
|
path="."
|
||||||
if [ ! -e "$path/flashchips.c" -o ! -e "$path/flashchips.h" ]; then
|
if [ ! -e "$path/flashchips.c" -o ! -e "$path/include/flashchips.h" ]; then
|
||||||
echo "Nope, sorry!"
|
echo "Nope, sorry!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chips=$(sed -re '/#define [A-Z]/ !d' -e '/_ID\s/d' -e 's/\s*#define\s+([[:alnum:]_]+)\s+.*/\1/' "$path/flashchips.h")
|
chips=$(sed -re '/#define [A-Z]/ !d' -e '/_ID\s/d' -e 's/\s*#define\s+([[:alnum:]_]+)\s+.*/\1/' "$path/include/flashchips.h")
|
||||||
for c in $chips ; do
|
for c in $chips ; do
|
||||||
if ! grep "$c" "$path/flashchips.c" >/dev/null ; then
|
if ! grep "$c" "$path/flashchips.c" >/dev/null ; then
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
grep -o "$c.*" "$path/flashchips.h"
|
grep -o "$c.*" "$path/include/flashchips.h"
|
||||||
else
|
else
|
||||||
echo "$c"
|
echo "$c"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user