exit when the wrong args are passed

This commit is contained in:
Kyle Isom 2023-10-14 23:35:03 -07:00
parent c2e83613f2
commit 659cd0252a
2 changed files with 1 additions and 5 deletions

View File

@ -34,11 +34,6 @@ tags: $(SOURCES)
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(OBJS)
.PHONY: cclean
cclean:
rm -r build cmake-build-*
print-%: ; @echo '$(subst ','\'',$*=$($*))' print-%: ; @echo '$(subst ','\'',$*=$($*))'
%.o:%.cc %.o:%.cc

View File

@ -149,6 +149,7 @@ main(int argc, char *argv[])
auto regexOptions = std::regex_constants::optimize; auto regexOptions = std::regex_constants::optimize;
if (argc < 4) { if (argc < 4) {
std::cerr << "Usage: rcpp pattern files... destination\n"; std::cerr << "Usage: rcpp pattern files... destination\n";
exit(0);
} }
auto pattern = std::string(argv[1]); auto pattern = std::string(argv[1]);