summaryrefslogtreecommitdiff
path: root/java/jdk12/scripts
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2003-08-23 15:17:29 +0000
committerGreg Lewis <glewis@FreeBSD.org>2003-08-23 15:17:29 +0000
commitd73e9f7a293ae53831be4069774df6fa14407eea (patch)
tree15392ed0ccf6ef27482130c1949836d4a64c0cac /java/jdk12/scripts
parentports/x11-wm: New version, 0.0.2 (diff)
. Add a script which checks if ${LINUX_BASE}/${WRKDIRPREFIX} is
(possibly indirectly) a symbolic link to ${WRKDIRPREFIX}. . Use this script in preference to the direct symbolic link check previously used, as it handles indirections which cause the same problem. . /compat/linux -> ${LINUXBASE} in the message output if the check detects a link. PR: 43602
Notes
Notes: svn path=/head/; revision=87559
Diffstat (limited to 'java/jdk12/scripts')
-rw-r--r--java/jdk12/scripts/check_wrkdir_links.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/java/jdk12/scripts/check_wrkdir_links.sh b/java/jdk12/scripts/check_wrkdir_links.sh
new file mode 100644
index 000000000000..a2f911204780
--- /dev/null
+++ b/java/jdk12/scripts/check_wrkdir_links.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD: /tmp/pcvs/ports/java/jdk12/scripts/Attic/check_wrkdir_links.sh,v 1.1 2003-08-23 15:17:29 glewis Exp $
+
+WRKDIRPREFIX=$1
+LINUXBASE=$2
+
+if [ "x${WRKDIRPREFIX}" = "x" -o "x${LINUXBASE}" = "x" ]; then
+ exit 0
+fi
+
+LINUXWRKDIRPREFIX="${LINUXBASE}/${WRKDIRPREFIX}"
+
+while [ "x${LINUXWRKDIRPREFIX}" != "x" ]; do
+ if [ -L "${LINUXWRKDIRPREFIX}" -a \
+ x`ls -ld "${LINUXWRKDIRPREFIX}" 2>/dev/null | \
+ awk '/->/{print $NF;exit 0}END{exit 1}'` = \
+ x"${WRKDIRPREFIX}" ]; then
+ echo "link"
+ exit 1
+ fi
+ if [ -L "${LINUXWRKDIRPREFIX}" ]; then
+ LINUXWRKDIRPREFIX=`ls -ld "${LINUXWRKDIRPREFIX}" 2>/dev/null | \
+ awk '/->/{print $NF;exit 0}END{exit 1}'`
+ else
+ break
+ fi
+done
+
+exit 0