Closed L1ghtmann closed 2 years ago
Note: I got the alphanum + "+-." from dm.pl. If there is a different regex you guys want to use, just let me know and I can change what's removed here.
I think it's good that both are in sync.
I noticed that the comma is not being stripped, is this because the output is from a previous run with a different regex?
Huh, didn't catch that before. Nope, that's with the current regex. Just ran it again to confirm. Seems that allowing "." also allows "," for some reason. Doesn't seem to cause any issues though. Worth trying to exclude it?
It’s because of +-.
- it’s expanding to every character between the two in ASCII, +,-.
. Putting -
at the end of the list would fix it.
Well today I learned, thanks! Should that also be adjusted in dm.pl's regex?
Ah good point, yep indeed that should be fixed.
What does this implement/fix? Explain your changes.
The NIC will now strip characters that are not alphanum or "+", "-", "." from the project name provided by the user and use that name where necessary (i.e., as the project directory name, as the
Package:
field of the control file, and as the*_NAME
field in the Makefile).Does this close any currently open issues?
Resolves #3
Any relevant logs, error output, etc?
N/A
Any other comments?
For a project named: "this 1_-- is a.!/ ,test+"
The NIC made:
include $(THEOS)/makefiles/common.mk
TOOL_NAME = this1--isa.,test+
this1--isa.,test+_FILES = main.m this1--isa.,test+_CFLAGS = -fobjc-arc this1--isa.,test+_CODESIGN_FLAGS = -Sentitlements.plist this1--isa.,test+_INSTALL_PATH = /usr/local/bin
include $(THEOS_MAKE_PATH)/tool.mk
Note: I got the alphanum + "+-." from dm.pl. If there is a different regex you guys want to use, just let me know and I can change what's removed here.
Where has this been tested?
Operating System: …
Linux (WSL)
Platform: …
Target Platform: …
Toolchain Version: …
SDK Version: …