Author: nbd
Date: 2016-01-03 21:58:02 +0100 (Sun, 03 Jan 2016)
New Revision: 48106

Modified:
   trunk/include/image.mk
Log:
image.mk: use new pure make functions for sanitizing image filenames

Signed-off-by: Felix Fietkau <[email protected]>

Modified: trunk/include/image.mk
===================================================================
--- trunk/include/image.mk      2016-01-03 20:57:53 UTC (rev 48105)
+++ trunk/include/image.mk      2016-01-03 20:58:02 UTC (rev 48106)
@@ -18,18 +18,8 @@
 KDIR_TMP=$(KDIR)/tmp
 DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
 
-define toupper
-$(shell echo $(1) | tr '[:lower:]' '[:upper:]')
-endef
+sanitize = $(call tolower,$(subst _,-,$(1)))
 
-define tolower
-$(shell echo $(1) | tr '[:upper:]' '[:lower:]')
-endef
-
-define sanitize
-$(shell echo $(call tolower,$(1)) | sed 's/_/-/g')
-endef
-
 DIST_SANITIZED:=$(call sanitize,$(VERSION_DIST))
 EXTRA_NAME_SANITIZED=$(call sanitize,$(EXTRA_IMAGE_NAME))
 
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to