[PC-BSD Commits] r13817 - pcbsd/current/src-sh/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Fri Nov 11 08:27:34 PST 2011


Author: kris
Date: 2011-11-11 08:27:34 -0800 (Fri, 11 Nov 2011)
New Revision: 13817

Modified:
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:

Use realpath to get file location




Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-11-11 14:28:48 UTC (rev 13816)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-11-11 16:27:34 UTC (rev 13817)
@@ -1225,13 +1225,7 @@
 
 # Get the absolute path of a dir
 get_abspath() {
-	D=`dirname "$1"`
-     	B=`basename "$1"`
-	if [ "$D" = "/" ] ; then
-		_ABSPATH="/$B"
-	else
-		_ABSPATH="`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
-	fi
+	_ABSPATH=`realpath $1`
 }
 
 



More information about the Commits mailing list