about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2013-03-18 12:44:47 +0100
committerAndreas Schwab <schwab@suse.de>2013-03-19 12:07:26 +0100
commitaaa8cb4b43511c62b11ac6f10e9beea3d5035a68 (patch)
tree19ca0e195c46f07ba377a8fc79d19048a75cd61e /scripts
parent5cebee5db0e891a91d947ef6015f1425fd2fd658 (diff)
downloadglibc-aaa8cb4b43511c62b11ac6f10e9beea3d5035a68.tar.gz
glibc-aaa8cb4b43511c62b11ac6f10e9beea3d5035a68.tar.xz
glibc-aaa8cb4b43511c62b11ac6f10e9beea3d5035a68.zip
Add support for rtld directory different from slib directory
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rellns-sh17
1 files changed, 15 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>.
 
+# 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