lnr is a script that implements the same behaviour as 'ln --relative
--symlink', as at the time of creation --relative was only available in
coreutils 8.16 onwards which was too new for the older supported distros.

Now, however, everyone has a new enough coreutils, so we can remove this
script.

All users of lnr should be replaced with ln --relative --symbolic.

Signed-off-by: Ross Burton <ross.bur...@arm.com>
---
 scripts/lnr | 24 ------------------------
 1 file changed, 24 deletions(-)
 delete mode 100755 scripts/lnr

diff --git a/scripts/lnr b/scripts/lnr
deleted file mode 100755
index a2ac4fec0f..0000000000
--- a/scripts/lnr
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /usr/bin/env python3
-#
-# SPDX-License-Identifier: GPL-2.0-only
-#
-
-# Create a *relative* symlink, just like ln --relative does but without needing
-# coreutils 8.16.
-
-import sys, os
-
-if len(sys.argv) != 3:
-   print("$ lnr TARGET LINK_NAME")
-   sys.exit(1)
-
-target = sys.argv[1]
-linkname = sys.argv[2]
-
-if os.path.isabs(target):
-   if not os.path.isabs(linkname):
-      linkname = os.path.abspath(linkname)
-   start = os.path.dirname(linkname)
-   target = os.path.relpath(target, start)
-
-os.symlink(target, linkname)
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158437): 
https://lists.openembedded.org/g/openembedded-core/message/158437
Mute This Topic: https://lists.openembedded.org/mt/87124801/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to