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

svn at pcbsd.org svn at pcbsd.org
Wed Sep 19 06:13:58 PDT 2012


Author: kris
Date: 2012-09-19 13:13:58 +0000 (Wed, 19 Sep 2012)
New Revision: 19344

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

Create the XDG / share directory automatically



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-09-19 13:12:13 UTC (rev 19343)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-09-19 13:13:58 UTC (rev 19344)
@@ -1235,6 +1235,7 @@
 # Make some of our required PBI dirs
 mk_required_dirs() {
 	if [ ! -d "${PBI_APPDIR}" ] ; then mkdir -p ${PBI_APPDIR} >/dev/null 2>/dev/null ; fi
+	if [ ! -d "${PBI_XDGDIR}" ] ; then mkdir -p ${PBI_XDGDIR} >/dev/null 2>/dev/null ; fi
 	if [ ! -d "${PBI_RCDIR}" ] ; then mkdir -p ${PBI_RCDIR} >/dev/null 2>/dev/null ; fi
 	if [ ! -d "${PBI_HASHDIR}" ] ; then mkdir -p ${PBI_HASHDIR} >/dev/null 2>/dev/null ; fi
 	if [ ! -d "${PBI_DBAPPDIR}" ] ; then mkdir -p ${PBI_DBAPPDIR} >/dev/null 2>/dev/null ; fi
@@ -1248,7 +1249,7 @@
 	# Set the permissions for directories if we are running as root
 	if [ `id -u` != "0" ] ; then return ; fi
 
-	for cDir in $PBI_APPDIR $PBI_DBAPPDIR $PBI_DBHASHQUEUEDIR
+	for cDir in $PBI_APPDIR $PBI_DBAPPDIR $PBI_DBHASHQUEUEDIR $PBI_XDGDIR
 	do	
 		chown root:${PBI_INSTALLGROUP} ${cDir}
 		chmod 775 ${cDir}
@@ -1289,6 +1290,7 @@
 	else
 		PBI_HASHDIR="${PBI_APPDIR}/.hashdir-`whoami`"
 	fi
+	PBI_XDGDIR="${PBI_APPDIR}/share"
 	PBI_RCDIR="${SYS_LOCALBASE}/etc/rc.d"
 	PBI_ETCCONF="${SYS_LOCALBASE}/etc/pbi.conf"
 	PCBSD_ETCCONF="${SYS_LOCALBASE}/etc/pcbsd.conf"



More information about the Commits mailing list