devel/newfile: add support for dots in project names.

Fix a bug that would stop `port create` from creating ports
with "dots" in their name -- `port create foo.bar` would
previously yield a directory "foo".

Approved by:    koobs (mentor)
This commit is contained in:
Johannes Jost Meixner 2015-01-23 10:39:33 +00:00
parent 8bfd314fcd
commit ec52e1a574
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=377721
3 changed files with 15 additions and 4 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= newfile
PORTVERSION= 1.0.14
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= devel
MASTER_SITES= SF

View file

@ -1,6 +1,6 @@
--- src/Makefile.in.orig 2003-11-03 20:49:37.000000000 +0800
+++ src/Makefile.in 2014-08-30 04:12:00.646368587 +0800
@@ -279,12 +279,12 @@
--- src/Makefile.in.orig 2003-11-03 12:49:37 UTC
+++ src/Makefile.in
@@ -279,12 +279,12 @@ uninstall-am: uninstall-info-am uninstal
install-data-hook:

View file

@ -0,0 +1,11 @@
--- src/newfile.rb.in.orig 2015-01-23 10:28:31 UTC
+++ src/newfile.rb.in
@@ -431,7 +431,7 @@ class NewfileOpts
|proj|
arr = proj.split(".")
@opts["template"] = arr[0]
- @opts["project"] = arr[1]
+ @opts["project"] = arr.drop(1).join('.')
}
@parser.def_option("-s", "--show",
"Show installed file templates, project#{NL}" +