1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From 10fa89cfedf1cdf826a3ded8fe2362ac02311240 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 21 Apr 2015 21:32:06 +0200
Subject: [PATCH] lddtree: remove bashism
Fixes #1. "Bad substitution" when running in dash.
---
lddtree.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lddtree.sh b/lddtree.sh
index 28c06d0..1968d08 100755
--- a/lddtree.sh
+++ b/lddtree.sh
@@ -1,8 +1,8 @@
#!/bin/sh
# Copyright 2007-2013 Gentoo Foundation
# Copyright 2007-2013 Mike Frysinger <vapier@gentoo.org>
+# Copyright 2014-2015 Natanael Copa <ncopa@alpinelinux.org>
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-projects/pax-utils/lddtree.sh,v 1.22 2013/04/07 19:20:09 vapier Exp $
argv0=${0##*/}
version=1.25
@@ -216,7 +216,12 @@ show_elf() {
allhits="${allhits},${interp},${libs}"
fi
- for lib in ${libs//,/ } ; do
+ oifs="$IFS"
+ IFS=,
+ set -- ${libs}
+ IFS="$oifs"
+
+ for lib; do
lib=${lib##*/}
case ",${my_allhits}," in
*,${lib},*) continue;;
--
2.8.3
|