#include #include #include #include "projet.h" #include "projetx.m" void arch_init () { REVISION newrev ("0.0"); USERBUILD bld ("",&newrev); if (file_type (bld.getombre())!=-1){ xconf_error (MSG_U(E_ARCHEXIST,"L'archive est déjà initialisée\n")); }else{ file_mkdiranc (bld.getombre()); file_mkdiranc (userinfo_chkenv("KITBUILD",KITBUILD)); file_mkdiranc (userinfo_chkenv("KITSYNC",KITSYNC)); file_mkdiranc (bld.getlivre()); file_mkdiranc (bld.getgroupe()); VERSION_DAT vdat (&bld); vdat.add ("init","init",&newrev); vdat.save (&bld); char path[MAXSIZ_PATH]; path_make (bld.getombre(),"_0_0.s",path); mkdir (path,0755); path_make (path,"makefile.dat",path); FILE *fout = fopen_err (path,"w",1); time_t tim = time(NULL); struct tm *t = localtime (&tim); fprintf (fout,"makefile.dat %02d/%02d/%04d %02d:%02d:%02d $(KITOMBRE)/_0_0.s/makefile.dat 0.0\n" ,t->tm_mday,t->tm_mon+1,t->tm_year+1900 ,t->tm_hour,t->tm_min,t->tm_sec); fclose (fout); xconf_notice (MSG_U(N_ARCHISOK,"L'archive a été intialisée")); } }