gdb/gdb-add-index.sh-fix-bashism.patch
Tom de Vries 4ba6c6a136 - Maintenance script qa.sh:
* Add PR29770 xfail (glibc).
  * Add PR31229 kfail.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=403
2025-01-08 13:22:00 +00:00

22 lines
580 B
Diff

[gdb-add-index.sh] Fix bashism
---
gdb/contrib/gdb-add-index.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
index 734110caa3b..00d3ae8b0ae 100755
--- a/gdb/contrib/gdb-add-index.sh
+++ b/gdb/contrib/gdb-add-index.sh
@@ -38,7 +38,9 @@ fi
file="$1"
if test -L "$file"; then
- if ! command -v readlink >/dev/null 2>&1; then
+ target=$(readlink "$file")
+ st=$?
+ if [ $st -eq 127 ]; then
echo "$myname: 'readlink' missing. Failed to follow symlink $1." 1>&2
exit 1
fi