Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/sdlew/auto/strip_comments.sh')
-rwxr-xr-xextern/sdlew/auto/strip_comments.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/extern/sdlew/auto/strip_comments.sh b/extern/sdlew/auto/strip_comments.sh
new file mode 100755
index 00000000000..c89224c3d56
--- /dev/null
+++ b/extern/sdlew/auto/strip_comments.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+SDL="SDL2"
+INCLUDE_DIR="/usr/include/${SDL}"
+SCRIPT=`realpath -s $0`
+DIR=`dirname $SCRIPT`
+DIR=`dirname $DIR`
+
+for f in $DIR/include/${SDL}/*.h; do
+ file_name=`basename $f`
+ echo "Striping $file_name..."
+ sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' -i $f
+ sed 's/[ \t]*$//' -i $f
+ sed '/^$/N;/^\n$/D' -i $f
+done