22 lines
580 B
Diff
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
|