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 From bc3a995360e6478a29becef3e2f2319aad7ef33a Mon Sep 17 00:00:00 2001 From: "John S. Urban" Date: Sun, 8 Aug 2021 12:00:36 -0400 Subject: replace lines deleted by conflict --- src/fpm/cmd/new.f90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fpm/cmd/new.f90 b/src/fpm/cmd/new.f90 index abc1d67..0d57a59 100644 --- a/src/fpm/cmd/new.f90 +++ b/src/fpm/cmd/new.f90 @@ -98,6 +98,9 @@ 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 -- cgit v1.2.3 From 2b0949f236f2fb022bfb4f92704443d087ea907e Mon Sep 17 00:00:00 2001 From: "John S. Urban" Date: Sun, 8 Aug 2021 12:01:47 -0400 Subject: white-space difference --- src/fpm/cmd/new.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fpm/cmd/new.f90 b/src/fpm/cmd/new.f90 index 0d57a59..2b8d990 100644 --- a/src/fpm/cmd/new.f90 +++ b/src/fpm/cmd/new.f90 @@ -99,7 +99,7 @@ character(len=:,kind=tfc),allocatable :: littlefile(:) bname=basename(settings%name) ! create NAME/.gitignore file - call warnwrite(join_path(settings%name, '.gitignore'), ['build/*']) + call warnwrite(join_path(settings%name, '.gitignore'), ['build/*']) littlefile=[character(len=80) :: '# '//bname, 'My cool new project!'] -- cgit v1.2.3