Revision: 7522
          http://sourceforge.net/p/ipcop/svn/7522
Author:   owes
Date:     2014-05-05 18:27:17 +0000 (Mon, 05 May 2014)
Log Message:
-----------
Adjust for Allura wiki.

Modified Paths:
--------------
    ipcop/trunk/tools/prepareIDmap.sh

Modified: ipcop/trunk/tools/prepareIDmap.sh
===================================================================
--- ipcop/trunk/tools/prepareIDmap.sh   2014-05-04 18:44:25 UTC (rev 7521)
+++ ipcop/trunk/tools/prepareIDmap.sh   2014-05-05 18:27:17 UTC (rev 7522)
@@ -1,7 +1,8 @@
 #!/bin/bash
 #
 # Build a list of PCI and USB identification codes for inclusion on the 
ipcop.org wiki
-# This is a slighlty modified version from the IPCop 1.4 script to allow for 
multiple platforms
+# https://sourceforge.net/p/ipcop/wiki/IPCopIDMapPCI/
+# https://sourceforge.net/p/ipcop/wiki/IPCopIDMapUSB/
 #
 # Use this script at top level after full build with ./tools/prepareIDmap.sh
 #
@@ -41,65 +42,39 @@
 fi
 
 
-# suppress first line temporary and sort by module name
-sed -e '/module/d' build_$MACHINE/ipcop/lib/modules/$KVER/modules.pcimap | 
sort > doc/tmpmap1.txt
+# suppress first line temporary and sort by module name, only output module 
and vendor+device ID
+sed -e '/module/d' build_$MACHINE/ipcop/lib/modules/$KVER/modules.pcimap | 
sort | awk '{ printf "%s|%s|%s\n",$1,$2,$3 }' > doc/tmpmap1.txt
 
-# cells are seperated by ;
-# CnxADSL is interpreted as link, fix that
-sed -i  -e 's/  */ /g'    \
-  -e 's/ /;/g'    \
-  -e 's/^/;/'   \
-  -e 's/|#|/;/'   \
-  -e 's/BusLogic/!BusLogic/'    \
-  -e 's/CnxADSL/!CnxADSL/'    \
-  doc/tmpmap1.txt
-
-# get rid of LF character
-tr -d "\n" < doc/tmpmap1.txt > doc/tmpmap2.txt
-
 # add comment
 echo "PCI id from $KVER compilation `date +'%Y-%m-%d'`" > doc/PCIidmap.txt
 echo " "  >>  doc/PCIidmap.txt
 
 # add table header
-echo -n "{{table columns=\"8\" cells=\"==pci 
module==;==vendor==;==device==;==subvendor==;==subdevice==;==class==;==class_mask==;==driver_data=="
 \
-  >>  doc/PCIidmap.txt
+echo "pci module | vendor | device" >> doc/PCIidmap.txt
+echo "----- | ----- | -----" >> doc/PCIidmap.txt
 
-cat doc/tmpmap2.txt >> doc/PCIidmap.txt
+# add the list of modules
+cat doc/tmpmap1.txt >> doc/PCIidmap.txt
 
-# and table terminator
-echo -n "\"}}" >> doc/PCIidmap.txt
 echo "PCI map stored as doc/PCIidmap.txt"
 
 
-# suppress first line temporary and sort by module name
-sed -e '/module/d' build_$MACHINE/ipcop/lib/modules/$KVER/modules.usbmap | 
sort > doc/tmpmap1.txt
+# suppress first line temporary and sort by module name, only output module, 
flags and vendor+product ID
+sed -e '/module/d' build_$MACHINE/ipcop/lib/modules/$KVER/modules.usbmap | 
sort | awk '{ printf "%s|%s|%s|%s\n",$1,$2,$3,$4 }' > doc/tmpmap1.txt
 
-# cells are seperated by ;
-sed -i  -e 's/  */ /g'    \
-  -e 's/ /;/g'    \
-  -e 's/^/;/'   \
-  -e 's/|#|/;/'   \
-  doc/tmpmap1.txt
-
-# get rid of LF character
-tr -d "\n" < doc/tmpmap1.txt > doc/tmpmap2.txt
-
 # add comment
 echo "USB id from $KVER compilation `date +'%Y-%m-%d'`" > doc/USBidmap.txt
 echo " "  >>  doc/USBidmap.txt
 
 # add table header
-echo -n "{{table columns=\"13\" cells=\"==usb 
module==;==match_flags==;==idVendor==;==idProduct==;==bcdDevice_lo==;==bcdDevice_hi==;==b!DeviceClass==;==b!DeviceSubClass==;==b!DeviceProtocol==;==b!InterfaceClass==;==b!InterfaceSubClass==;==b!InterfaceProtocol==;==driver_info=="
 \
-  >>  doc/USBidmap.txt
+echo "usb module | match_flags | idVendor | idProduct" >>  doc/USBidmap.txt
+echo "----- | ----- | ----- | -----" >> doc/USBidmap.txt
 
-cat doc/tmpmap2.txt >> doc/USBidmap.txt
+# add the list of modules
+cat doc/tmpmap1.txt >> doc/USBidmap.txt
 
-# and table terminator
-echo -n "\"}}" >> doc/USBidmap.txt
 echo "USB map stored as doc/USBidmap.txt"
 
 # clean up
 rm doc/tmpmap1.txt
-rm doc/tmpmap2.txt
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to