To find the auxiliary script that updates a moduleset, consider the case
where the main script is accessed through a symlink, and resolve that
first.

Signed-off-by: Dirk Wallenstein <hals...@t-online.de>
---

v2: Use 'readlink -f' instead of 'realpath'

On Sun, Mar 13, 2011 at 08:52:02AM -0700, Dan Nicholson wrote:
> Hmm, I don't have realpath on fedora and yum doesn't know of any
> realpath packages. Might be safer to use "readlink -f" since readlink
> comes from coreutils, which is definitely installed on every linux
> host if not every unix host.
I don't even know why I have realpath.  I just thought for a sec that
that is some sort of ingenious command that I was accidentally missing
all the time.

 release.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/release.sh b/release.sh
index 5cb2f3d..03687ac 100755
--- a/release.sh
+++ b/release.sh
@@ -253,7 +253,8 @@ echo "    at: $announce"
 
 if [ -n "$moduleset" ]; then
     echo "updating moduleset $moduleset"
-    modulardir=`dirname "$0"`
+    real_script_path=`readlink -f "$0"`
+    modulardir=`dirname "$real_script_path"`
     sha1sum=`cd $tarball_dir && $SHA1SUM $targz | cut -d' ' -f1`
     $modulardir/update-moduleset.sh $moduleset $sha1sum $targz
 fi
-- 
1.7.0.2

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to