[26150] in Source-Commits
/svn/athena r25420 - trunk/debathena/scripts
daemon@ATHENA.MIT.EDU (Alexander W Dehnert)
Sun Oct 23 01:37:33 2011
Date: Sun, 23 Oct 2011 01:37:31 -0400
From: Alexander W Dehnert <adehnert@MIT.EDU>
Message-Id: <201110230537.p9N5bV5W028722@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: adehnert
Date: 2011-10-23 01:37:31 -0400 (Sun, 23 Oct 2011)
New Revision: 25420
Modified:
trunk/debathena/scripts/dasource
Log:
Fix dasource when run with a relative path
If you try to dasource using a relative path, instead of using a full path,
it'll error out when trying to run daorig. The reason for this is that daorig
is run as $basedir/daorig, but inside a subshell with a different CWD. Fix this
by using readlink -f to get a full path instead of just initializing $basedir
as $(dirname "$0").
Modified: trunk/debathena/scripts/dasource
===================================================================
--- trunk/debathena/scripts/dasource 2011-10-20 20:00:16 UTC (rev 25419)
+++ trunk/debathena/scripts/dasource 2011-10-23 05:37:31 UTC (rev 25420)
@@ -24,7 +24,7 @@
die "dasource [-r repos] [packagename ...]"
}
-basedir=$(dirname "$0")
+basedir=$(dirname "$(readlink -f "$0")")
repo=svn+ssh://svn.mit.edu/athena/trunk
while getopts r: opt; do