[PATCH modular] release.sh: Find modular directory through symlinks

Dirk Wallenstein halsmit at t-online.de
Sun Mar 13 03:34:32 PDT 2011


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 <halsmit at t-online.de>
---
 release.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/release.sh b/release.sh
index 5228a30..e8ea013 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=`realpath "$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.3.2



More information about the xorg-devel mailing list