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

strip_comments.sh « auto « sdlew « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c89224c3d5626760d513dfb4c474c1329fa67f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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