source: valtobtest/subversion-1.6.2/build/transform_sql.sh @ 3

Last change on this file since 3 was 3, checked in by valtob, 15 years ago

subversion source 1.6.2 as test

  • Property svn:executable set to *
File size: 843 bytes
Line 
1#!/bin/sh
2
3varname=`basename $1 | tr "[a-z]" "[A-Z]" | tr "-" "_" | tr "." "_"`
4
5echo "/* This file is automatically generated from"
6echo " * $1"
7echo " * Do not edit it directly, but edit the source file and rerun 'make'"
8echo " */"
9echo
10echo "#define $varname \\"
11
12comment=false
13
14IFS="
15"
16while read line; do
17  line=`echo "$line" | sed -e 's/\/\*.*\*\///g' | sed -e 's/[ ]*$//g'`
18
19  if [ -z "$line" ]; then
20    continue
21  fi
22
23  if [ "$comment" = "false" ] && echo "$line" | fgrep '/*' >/dev/null; then
24    comment=true
25  fi
26
27  if [ "$comment" = "true" ] && echo "$line" | fgrep '*/' >/dev/null; then
28    comment=false
29    continue
30  fi
31
32  if [ "$comment" = "true" ]; then
33    continue
34  fi
35
36  line="`echo "$line" | sed -e 's/"/\\"/g'`"  #' hi, emacs syntax coloring!
37  if [ -n "$line" ]; then
38    echo "  \"$line \"\\"
39  fi
40done
41
42echo '  ""'
Note: See TracBrowser for help on using the repository browser.