From aaa8cb4b43511c62b11ac6f10e9beea3d5035a68 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 18 Mar 2013 12:44:47 +0100 Subject: Add support for rtld directory different from slib directory --- scripts/rellns-sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/rellns-sh b/scripts/rellns-sh index 0e861b5fa5..9a1496a9fd 100755 --- a/scripts/rellns-sh +++ b/scripts/rellns-sh @@ -16,8 +16,17 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see . +# With -p, instead of creating the link print the computed relative link +# name. +do_print=false +case $1 in + -p) + do_print=true + shift + ;; +esac if test $# -ne 2; then - echo "Usage: rellns SOURCE DEST" >&2 + echo "Usage: rellns [-p] SOURCE DEST" >&2 exit 1 fi @@ -70,4 +79,8 @@ while test -n "$from"; do from=`echo $from | sed 's%^[^/]*/*%%'` done -ln -s $rfrom$to $2 +if $do_print; then + echo "$rfrom$to" +else + ln -s $rfrom$to $2 +fi -- cgit v1.2.3