Changeset 851


Ignore:
Timestamp:
Sep 18, 2009, 12:49:37 AM (10 years ago)
Author:
bruno
Message:
  • Create a ~/.pbr as template if no previous one was there - Fix #47 (Bruno Cornec)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/Env.pm

    r736 r851  
    6666
    6767$ENV{'PBETC'} = "$ENV{'HOME'}/.pbrc";
     68
     69if (! -f $ENV{'PBETC'}) {
     70    pb_log(0, "No existing $ENV{'PBETC'} found, creating one as template");
     71    open(PBRC, "> $ENV{'PBETC'}") || die "Unable to create $ENV{'PBETC'}";
     72    print PBRC << "EOF";
     73#
     74# Define for each project the URL of its pbconf repository
     75# No default option allowed here as they need to be all different
     76#
     77#pbconfurl example = svn+ssh://svn.example.org/svn/pb/projects/example/pbconf
     78#pbconfurl pb = svn+ssh://svn.project-builder.org/mondo/svn/pb/pbconf
     79
     80# Under that dir will take place everything related to pb
     81# If you want to use VMs/chroot/..., then use \$ENV{'HOME'} to make it portable
     82# to your VMs/chroot/...
     83# if not defined then /var/cache
     84#pbdefdir default = \$ENV{'HOME'}/pb/projects
     85#pbdefdir pb = \$ENV{'HOME'}
     86
     87# If not defined, pbconfdir is under pbdefdir/pbproj/pbconf
     88#pbconfdir pb = \$ENV{'HOME'}/pb/pbconf
     89
     90# If not defined, pbprojdir is under pbdefdir/pbproj
     91# Only defined if we have access to the dev of the project
     92#pbprojdir example = \$ENV{'HOME'}/example/svn
     93
     94# We have commit acces to these
     95#pburl example = cvs+ssh://user\@example.cvs.sourceforge.net:/cvsroot/example
     96#pburl pb = svn+ssh://svn.project-builder.org/mondo/svn/pb
     97
     98# I mask my real login on the ssh machines here
     99#sshlogin example = user
     100
     101# where to find Build System infos:
     102#vmpath default = /home/qemu
     103#vepath default = /home/rinse
     104
     105# Overwrite generic setup
     106#vmport pb = 2223
     107#vmport example = 2224
     108EOF
     109    }
    68110
    69111# We only have one configuration file for now.
Note: See TracChangeset for help on using the changeset viewer.