From 6d12e631a271c5189ef51da7e5362031dbf6aa03 Mon Sep 17 00:00:00 2001 From: tron Date: Tue, 24 Aug 1999 21:15:30 +0000 Subject: Retarget symbol links so that the Linux emulation can resolve them, too. --- emulators/suse_base/scripts/rpm2pkg.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/emulators/suse_base/scripts/rpm2pkg.sh b/emulators/suse_base/scripts/rpm2pkg.sh index 55aaf984c34..1ce74db2a50 100755 --- a/emulators/suse_base/scripts/rpm2pkg.sh +++ b/emulators/suse_base/scripts/rpm2pkg.sh @@ -33,16 +33,25 @@ grep -v ^pax:\ $LIST | @@AWK@@ '{print("@@EMULSUBDIR@@/"$1)}' | shift `expr $# - 1`; case $1 in /* ) - set - @@EMULDIR@@$1 + TARGET=`echo $1 | cut -c 2-` + DIR=`dirname $ENTRY` + while [ $DIR != @@EMULSUBDIR@@ ] + do + TARGET=../$TARGET + DIR=`dirname $DIR` + done + unset DIR rm $ENTRY - ln -s $1 $ENTRY + ln -s $TARGET $ENTRY ;; + * ) + TARGET=$1 esac - if cd `dirname $ENTRY` && test -f $1 + if cd `dirname $ENTRY` && test -f $TARGET then echo $ENTRY else - echo "@exec ln -s $1 %D/$ENTRY" >>$LINKS + echo "@exec ln -s $TARGET %D/$ENTRY" >>$LINKS echo "@unexec rm -f %D/$ENTRY" >>$LINKS fi cd @@PREFIX@@ -- cgit v1.2.3