[Bps-public-commit] Shipwright branch, master, updated. c12b7bd9f794203eb7de3a14a3d202392f38161d

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Aug 3 01:30:17 EDT 2009


The branch, master has been updated
       via  c12b7bd9f794203eb7de3a14a3d202392f38161d (commit)
      from  a9f80dfd6060b84cd4f9dff82b3fd8fd85044550 (commit)

Summary of changes:
 lib/Shipwright/Util.pm |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit c12b7bd9f794203eb7de3a14a3d202392f38161d
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Aug 3 13:28:06 2009 +0800

    add shipwright_user_root method to get a not so *temp* place so we can keep something

diff --git a/lib/Shipwright/Util.pm b/lib/Shipwright/Util.pm
index beef49e..9b78456 100644
--- a/lib/Shipwright/Util.pm
+++ b/lib/Shipwright/Util.pm
@@ -192,6 +192,18 @@ sub user_home {
     return (getpwuid $<)[7];
 }
 
+=head2 shipwright_user_root
+
+the user's own shipwright root where we put internal files in.
+it's ~/.shipwright by default.
+it can be overwritten by $ENV{SHIPWRIGHT_USER_ROOT}
+
+=cut
+
+sub shipwright_user_root {
+    return $ENV{SHIPWRIGHT_USER_ROOT} || catdir( user_home, '.shipwright' );
+}
+
 1;
 
 __END__

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list