Przeglądaj źródła

improve package name conversion to makefile variable

No need to call sed here, as tr already does exactly what we want to,
just by extending the expression passed to it.
Phil Sutter 14 lat temu
rodzic
commit
5cb78c4c3b
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      mk/build.mk

+ 1 - 1
mk/build.mk

@@ -188,7 +188,7 @@ kernelconfig:
 newpackage:
 	@echo "Creating new package $(PKG)"
 	$(CP) $(TOPDIR)/package/.template $(TOPDIR)/package/$(PKG)
-	pkg=$$(echo $(PKG)|tr '[:lower:]' '[:upper:]'|sed -e "s/-/_/g"); \
+	pkg=$$(echo $(PKG)|tr '[:lower:]-' '[:upper:]_'); \
 		$(SED) "s#@UPKG@#$$pkg#" $(TOPDIR)/package/$(PKG)/Makefile
 	$(SED) 's#@PKG@#$(PKG)#' $(TOPDIR)/package/$(PKG)/Makefile
 	$(SED) 's#@VER@#$(VER)#' $(TOPDIR)/package/$(PKG)/Makefile