summaryrefslogtreecommitdiff
path: root/bsp/fix-generated-files
diff options
context:
space:
mode:
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