summaryrefslogtreecommitdiff
path: root/package/utils
diff options
context:
space:
mode:
authorJulian Labus <julian@labus-online.de>2017-05-24 16:32:18 +0200
committerJo-Philipp Wich <jo@mein.io>2017-12-13 15:50:37 +0100
commita44c44077ea44f81a7ca88b59aac78f53cc09368 (patch)
tree75c9e1e9d1e5918e11c063138d895b54a713d3ae /package/utils
parente8bd0a606a60ad37a7a737943f6b5a5347953167 (diff)
downloadmtk-20170518-a44c44077ea44f81a7ca88b59aac78f53cc09368.zip
mtk-20170518-a44c44077ea44f81a7ca88b59aac78f53cc09368.tar.gz
mtk-20170518-a44c44077ea44f81a7ca88b59aac78f53cc09368.tar.bz2
usbmode: remove devices with unsupported modes
remove files which include the following mode options BlackberryMode OptionMode PantechMode QuantaMode Signed-off-by: Julian Labus <julian@labus-online.de> (cherry picked from commit b757de65b3c3aa210022c65445df1d6dbbf9eadd)
Diffstat (limited to 'package/utils')
-rw-r--r--package/utils/usbmode/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
index 7f0195f..1b1ef14 100644
--- a/package/utils/usbmode/Makefile
+++ b/package/utils/usbmode/Makefile
@@ -40,8 +40,13 @@ endef
define Build/Prepare
$(Build/Prepare/Default)
tar xvfj $(DL_DIR)/$(PKG_DATA_FILENAME) -C $(PKG_BUILD_DIR)
- rm -f \
- $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/05c6:1000:sVe=GT
+ #remove devices with unsupported modes
+ for filevar in $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/* ; \
+ do \
+ if grep -q -E '(Quanta|Option|Blackberry|Pantech)Mode' "$$$$filevar" ; then \
+ rm "$$$$filevar" ; \
+ fi \
+ done
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