From d6f5bf20b2245564ba4a851d1f4ea9b19ba579b6 Mon Sep 17 00:00:00 2001 From: "John S. Urban" Date: Sun, 8 Aug 2021 11:26:57 -0400 Subject: still call "git init" even if fpm.toml exists in backfill --- src/fpm/cmd/new.f90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fpm/cmd/new.f90 b/src/fpm/cmd/new.f90 index 81cf62f..abc1d67 100644 --- a/src/fpm/cmd/new.f90 +++ b/src/fpm/cmd/new.f90 @@ -98,9 +98,6 @@ character(len=:,kind=tfc),allocatable :: littlefile(:) ! like realpath() or getcwd(). bname=basename(settings%name) - ! create NAME/.gitignore file - call warnwrite(join_path(settings%name, '.gitignore'), ['build/*']) - littlefile=[character(len=80) :: '# '//bname, 'My cool new project!'] ! create NAME/README.md @@ -592,6 +589,11 @@ character(len=*),intent(in) :: filename integer :: lun character(len=8) :: date + if(exists(filename))then + write(stderr,'(*(g0,1x))')' ',filename,& + & 'already exists. Not overwriting' + return + endif !> get date to put into metadata in manifest file "fpm.toml" call date_and_time(DATE=date) table = toml_table() -- cgit v1.2.3