[PATCH modular v2] release.sh: Find modular directory through symlinks
halsmit at t-online.de
Sun Mar 13 09:28:58 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
Signed-off-by: Dirk Wallenstein <halsmit at 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
@@ -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
More information about the xorg-devel