summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>2011-04-18 13:42:22 -0400
committerLeon Brocard <acme@astray.com>2011-05-24 10:12:11 +0100
commit9d220e4240c1f6b6de17a6b0608f66088ddff181 (patch)
tree2836c9afc3e6ff66462e53eb82f99466cbc3c414
parent6be3669b23702fc7aca7080386195d8fde5a186b (diff)
downloadperl-9d220e4240c1f6b6de17a6b0608f66088ddff181.tar.gz
collapse plibpth to one line and remove trailing /
The recent change to hints/linux.sh, 40f026236b9959b7ad3260fedc6c66cd30bb7abc set the plibpth variable. It was supposed to set all entries on a single line, but it didn't. Do it now, and also remove trailing /'s. (The collapsing is a more robust version of the previous commit, since reverted, that davem wrote independently). (cherry picked from commit bcab1245a0693be445ce018352f6fbe4abc26e88)
-rw-r--r--hints/linux.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/hints/linux.sh b/hints/linux.sh
index fdefb027f8..0519eca307 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -164,8 +164,10 @@ esac
# plibpth to bypass this check.
case "$plibpth" in
'') plibpth=`gcc -print-search-dirs | grep libraries |
- cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'`
- plibpth="$plibpth" # Collapse all entries on one line
+ cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
+ set X $plibpth # Collapse all entries on one line
+ shift
+ plibpth="$*"
;;
esac