summaryrefslogtreecommitdiff
path: root/bsp/fix-generated-files
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-05-27 10:55:23 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-05-27 11:01:19 +0200
commita819d3cbddbb5294b98b2fd6590f9fff13491d85 (patch)
treea529b8260f7f8a8d589de3f4dcdb278fea08ab25 /bsp/fix-generated-files
parent46b7f97720293e098fa26eb5269b481c45819deb (diff)
downloadradio-controller-a819d3cbddbb5294b98b2fd6590f9fff13491d85.tar.gz
radio-controller-a819d3cbddbb5294b98b2fd6590f9fff13491d85.tar.bz2
radio-controller-a819d3cbddbb5294b98b2fd6590f9fff13491d85.tar.xz
radio-controller-a819d3cbddbb5294b98b2fd6590f9fff13491d85.zip
o Moving generated code to under bsp/. Renaming to match PCB.
Diffstat (limited to 'bsp/fix-generated-files')
-rwxr-xr-xbsp/fix-generated-files33
1 files changed, 33 insertions, 0 deletions
diff --git a/bsp/fix-generated-files b/bsp/fix-generated-files
new file mode 100755
index 0000000..0b765d0
--- /dev/null
+++ b/bsp/fix-generated-files
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+dir=$(cd $(dirname $0) && pwd)
+
+find ${dir} -type f |while read file
+do
+ cat ${file} | \
+ dos2unix | \
+ sed -e 's,[\t ]*$,,g' \
+ -e "s,"$'\x92'",'," \
+ > ${file}.tmp
+ cnt=$(diff ${file}.tmp ${file} | wc -l)
+
+ if [[ ${cnt} -gt 0 ]]
+ then
+ echo Fixed ${file}
+ mv ${file}.tmp ${file}
+ else
+ rm ${file}.tmp
+ fi
+done
+
+find ${dir} -name '*.gpdsc' | while read f
+do
+ cat ${f} | grep -v '<url>' > ${f}.tmp
+ mv ${f}.tmp ${f}
+done
+
+find ${dir} -name '*.ioc' | while read f
+do
+ cat ${f} | grep -v 'ProjectManager.CustomerFirmwarePackage' > ${f}.tmp
+ mv ${f}.tmp ${f}
+done