aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/usbmode/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/usbmode/Makefile')
-rw-r--r--package/utils/usbmode/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
index 6737b5f42b..d835d373ba 100644
--- a/package/utils/usbmode/Makefile
+++ b/package/utils/usbmode/Makefile
@@ -45,6 +45,17 @@ define Build/Prepare
rm -f \
$(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/05c6:1000:sVe=GT
cp ./data/* $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/
+ #in order to keep the Lede GIT repo free of filenames with colons,
+ #we name the files xxxx-yyyy
+ # and rename here after copying to the build directory
+ for filevar in $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/*-* ; \
+ do \
+ [ -f "$$$$filevar" ] || continue ; \
+ FILENAME=$$$$(basename $$$$filevar) ; \
+ NEWNAME=$$$${FILENAME//-/:} ; \
+ rm "$(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/$$$$NEWNAME" ; \
+ mv "$(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/$$$$FILENAME" "$(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/$$$$NEWNAME" ; \
+ done
endef
define Package/usb-modeswitch/install