Changeset 100 for trunk/bin


Ignore:
Timestamp:
Jun 19, 2006, 11:53:16 AM (15 years ago)
Author:
Peter Johansson
Message:

closes #9 and move create function from svnstat.cc to lib/utility and also move rmdirhier to lib

Location:
trunk/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Makefile.am

    r96 r100  
    2424bin_PROGRAMS = svnstat
    2525
    26 svnstat_SOURCES = Parameter.cc rmdirhier.cc svnstat.cc
     26svnstat_SOURCES = Parameter.cc svnstat.cc
    2727
    28 noinst_HEADERS = Parameter.h rmdirhier.h
     28noinst_HEADERS = Parameter.h
    2929
    3030LDADD = @top_srcdir@/lib/libsvnstat.a -L$(APR_PATH)/lib -L$(SVN_PATH)/lib \
  • trunk/bin/svnstat.cc

    r92 r100  
    2929#include "rmdirhier.h"
    3030#include "SVN.h"
     31#include "utility.h"
    3132
    3233#include <iostream>
     
    3738
    3839using namespace std;
    39 
    40 ///
    41 /// Create directory \a dir. The call can fail in many ways, cf. 'man
    42 /// mkdir'. If the \a dir exists, setting \a force to true will
    43 /// trigger a recursive removal of the target \a dir.
    44 ///
    45 int createdir(const string& dir, bool force=false);
    46 
    4740
    4841int main(const int argc,const char* argv[])
     
    7568  }
    7669
    77   Directory tree(option.root(),"svnstat_");
     70  Directory tree(option.root(),"");
    7871  tree.parse(option.verbose());
    7972
     
    8679    std::cerr << "svnstat: " << x.what() << std::endl;
    8780  }
    88   string htmltopnode=tree.output_name()+".html";
    89   symlink(htmltopnode.c_str(),"index.html");
     81  //string htmltopnode=tree.output_name()+"/index.html";
     82  //symlink(htmltopnode.c_str(),"index.html");
    9083
    9184  exit(0);        // normal exit
     
    9386
    9487
    95 int createdir(const string& dir, bool force)
    96 {
    97   struct stat buf;
    98   if (force && !stat(dir.c_str(),&buf))
    99     theplu::svnstat::rmdirhier(dir);
    100 
    101   return mkdir(dir.c_str(),0777);
    102 }
Note: See TracChangeset for help on using the changeset viewer.