usbmode: rename data files
authorSimon Hailes <btsimonh@googlemail.com>
Tue, 11 Oct 2016 18:01:21 +0000 (19:01 +0100)
committerJohn Crispin <john@phrozen.org>
Wed, 26 Oct 2016 13:16:51 +0000 (15:16 +0200)
This is to ensure that git can be cloned onto a windows drive without failing.

Signed-off-by: Simon Hailes <btsimonh@googlemail.com>
package/utils/usbmode/Makefile
package/utils/usbmode/data/12d1-1f16 [new file with mode: 0644]
package/utils/usbmode/data/12d1:1f16 [deleted file]

index 6737b5f42b3972a508ea52beb86cd936accf97ba..d835d373bac18d8993254b42399db2fb195a75c9 100644 (file)
@@ -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
diff --git a/package/utils/usbmode/data/12d1-1f16 b/package/utils/usbmode/data/12d1-1f16
new file mode 100644 (file)
index 0000000..beda01f
--- /dev/null
@@ -0,0 +1,2 @@
+# Vodafone K5150
+MBIM=1
diff --git a/package/utils/usbmode/data/12d1:1f16 b/package/utils/usbmode/data/12d1:1f16
deleted file mode 100644 (file)
index beda01f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# Vodafone K5150
-MBIM=1